diff options
-rw-r--r-- | modules/sudo/manifests/init.pp | 20 | ||||
-rw-r--r-- | modules/sudo/templates/sudoers | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/modules/sudo/manifests/init.pp b/modules/sudo/manifests/init.pp new file mode 100644 index 00000000..3c175393 --- /dev/null +++ b/modules/sudo/manifests/init.pp @@ -0,0 +1,20 @@ +class sudo { + package { sudo: + ensure => installed; + } + + file { "/etc/sudoers.d": + ensure => directory, + mode => 700, + owner => root, + group => root, + } + + file { "/etc/sudoers": + ensure => present, + owner => root, + group => root, + mode => 600, + content => template("sudo/sudoers") + } +} diff --git a/modules/sudo/templates/sudoers b/modules/sudo/templates/sudoers new file mode 100644 index 00000000..80f4bfd7 --- /dev/null +++ b/modules/sudo/templates/sudoers @@ -0,0 +1 @@ +#includedir /etc/sudoers.d |