Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

facter fact selinux; WARNING: quoted boolean value found on line #197

Closed
sheijmans opened this issue Apr 16, 2013 · 1 comment
Closed

facter fact selinux; WARNING: quoted boolean value found on line #197

sheijmans opened this issue Apr 16, 2013 · 1 comment

Comments

@sheijmans
Copy link

selinux facter fact is true of false but Puppet still handles this a string [1], so this is somewhat incorrect to display the warning message.

[1] http://projects.puppetlabs.com/issues/3704

@rodjek
Copy link
Owner

rodjek commented Apr 16, 2013

This is a "bug" in Facter that will be addressed in Facter 2.x. The warning is still very correct as "true" != true.

In my opinion, the most correct thing to do in this situation would be to convert the output of facter to a proper boolean, that way upon release of Facter 2.x, your manifest will already be correct and won't require modification.

if str2bool($::selinux) == true {
  notify { 'selinux enabled': }
}

The str2bool function is available in the Puppet Labs stdlib module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants