Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

when I try to update /etc/sudoers in puppet master the file it doesnt get updated!

Hello All,

i have created a module called Sudoers here is the content of the init.pp

File { owner => "root", group => "root", mode => "0440" }

    file {"/etc/sudoers":
            ensure => "present",
            content => template("sudoers/sudoers.erb"),
    }

    file {  "/etc/sudoers.d":
                    ensure  => "directory",
                    owner   => "root",
                    group   => "root",
                    recurse => "false",
                    mode    => 550,
    }

and this is the content of sudoers.erb

root ALL=(ALL) NOPASSWD: ALL

Admins

user1 ALL=(ALL) NOPASSWD: ALL user2 ALL=(ALL) NOPASSWD: ALL

now when i do puppet agent --test

i am getting

Info: Retrieving pluginfacts Info: Retrieving plugin Info: Caching catalog for ip-10-167-26-44. Info: Applying configuration version '1441378237' Notice: Finished catalog run in 0.03 seconds

but when i look to content of /etc/sudeors nothing get uppdated. basically all my sudeors class is ignored can you guys tell me what I am doing wrong?

Thanks a lot!

click to hide/show revision 2
No.2 Revision

when I try to update /etc/sudoers in puppet master the file it doesnt get updated!

Hello All,

i have created a module called Sudoers here is the content of the init.pp

File { owner => "root", group => "root", mode  => "0440" }

}

    file {"/etc/sudoers":
            ensure => "present",
            content => template("sudoers/sudoers.erb"),
    }

    file {  "/etc/sudoers.d":
                    ensure  => "directory",
                    owner   => "root",
                    group   => "root",
                    recurse => "false",
                    mode    => 550,
    }

and this is the content of sudoers.erb

root                            ALL=(ALL)       NOPASSWD: ALL

Admins

ALL # Admins user1 ALL=(ALL) NOPASSWD: ALL user2 ALL=(ALL) NOPASSWD: ALL

ALL

now when i do puppet agent --test

i am getting

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for ip-10-167-26-44.
Info: Applying configuration version '1441378237'
Notice: Finished catalog run in 0.03 seconds

seconds

but when i look to content of /etc/sudeors nothing get uppdated. basically all my sudeors class is ignored can you guys tell me what I am doing wrong?

Thanks a lot!