Ask Your Question

babak1973's profile - activity

2016-07-13 09:40:53 -0500 received badge  Notable Question (source)
2016-07-13 09:40:53 -0500 received badge  Famous Question (source)
2015-09-16 14:58:31 -0500 received badge  Popular Question (source)
2015-09-04 13:14:56 -0500 commented answer when I try to update /etc/sudoers in puppet master the file it doesnt get updated!

sorry I found the issue, in my default.pp i should have entered include sudoers Thank you again

2015-09-04 13:09:10 -0500 answered a question when I try to update /etc/sudoers in puppet master the file it doesnt get updated!

Hi Greg, Thank you for your reply.

I am using site.pp

import "nodes/*.pp"

and then inside nodes folder

  if $::ipaddress =~ /^10\.162\.[5,6]\.\d{1,3}$/ {
        include user::groups
        include user::sysadmin
  }
}

please note that the /etc/sudoers it is not get updated inside puppet master as well

Thank you again

2015-09-04 12:01:19 -0500 asked a question 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!