thias/puppet-samba — pull request #2 by cleverlight (2013-11-07 18:29:26+00:00)
Title: wrapped $::selinux in str2bool because is needs to be converted from a s...

I've wrapped $::selinux in str2bool because is needs to be converted from a string to a boolean to be evaluated properly

http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#automatic-conversion-to-boolean

Empty strings are false; all other strings are true. That means the string "false" actually resolves as true. Warning: all facts are strings in this version of Puppet, so “boolean” facts must be handled carefully.

if ($::selinux)

will always return true, whereas

if (str2bool($::selinux))

will return the actual value