Hello there

This may not be the right place, but i hope it is :)

I've been banging my head against the wall for a while, some of the
documentation is lagging behind what is current and i'm new to puppet
so I'm having difficulty finding things, and nevermind that today was
the first day i coded in ruby. In short i'm as n00b as n00b can be.

my problem is that i've written a facter, and for the sake of testing
i've called it deploy_sudoers.rb it is located at and contains:
[r...@puppetbeta facter]# pwd
/etc/puppet/modules/cust/plugins/facter
[r...@puppetbeta facter]# cat deploy_sudoers.rb
require 'facter'

deploy_sudoers = FileTest.exists?("/var/lib/puppet/classes/
DoNotDeploySudoers")

Facter.add("deploy_sudoers") do
        setcode do
                !deploy_sudoers
        end
end

It makes it across to the slave, and facter appears to be aware of it:
[r...@puppetslave ~]# echo $FACTERLIB
/var/lib/puppet/lib/facter
[r...@puppetslave ~]# facter deploy_sudoers
false
[r...@puppetslave ~]# ls /var/lib/puppet/classes/DoNotDeploySudoers
/var/lib/puppet/classes/DoNotDeploySudoers

Unfortunately sudoers continues being changed, despite my class (/etc/
puppet/manifests/classes/shared.class) being:
class shared_files
{
        if $deploy_sudoers
        {
                file
                { "/etc/sudoers":
                        owner => root,
                        group => root,
                        mode => 440,
                        source => "puppet:///shared/etc/sudoers",
                }
        }
        else
        {
                file
                { "/etc/sudoers":
                        owner => root,
                        group => root,
                        mode => 440,
                }
        }
}

site.pp imports classes/* and my default includes shared_files .
However it appears that the if statement is ever evaluated.

I'm using the most current version from EPEL, which today is:
[r...@puppetslave ~]# rpm -q puppet
puppet-0.24.6-1.el5

any ideas?

Cheers
chakkerz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to