Hello again

My yaml file for puppetslave contains the fact:
[r...@puppetbeta manifests]# grep deploysudoers /var/lib/puppet/yaml/
facts/puppetslave.its.uq.edu.au.yaml
  deploysudoers: "false"

which i note is a string (quotes), not a true / false / boolean ... so
i've fixed my fact by changing my module's init.pp (note the string
comparison):

class sudoers-linux
{
        if $deploysudoers == "true"
        {
                file
                { "/etc/sudoers":
                        owner => root,
                        group => root,
                        mode => 440,
                        source => "puppet:///shared/etc/sudoers",
                }
        }
        else
        {
                file
                { "/etc/sudoers":
                        owner => root,
                        group => root,
                        mode => 440,
                }
        }
}

I've verified that this works as expected by removing / creating the
file which the fact checks exists. The first example at
http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#if-else
seems to indicate that $variable can be a boolean but i don't see how
i can get a boolean out of a facter. Is there a way?

Although it is working, i would really like to have a boolean instead
of a string, because it worries me that someone somwhere (ruby or
facter) could decide that that should be "TRUE" instead of "true" ...
which could foreseeably mean an update might do damage...

Cheers
chakkerz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to