diff --git a/modules/rhizo_base/files/etc/sudoers b/modules/rhizo_base/files/etc/sudoers new file mode 100644 index 0000000..8babb77 --- /dev/null +++ b/modules/rhizo_base/files/etc/sudoers @@ -0,0 +1,29 @@ +# +# This file MUST be edited with the 'visudo' command as root. +# +# Please consider adding local content in /etc/sudoers.d/ instead of +# directly modifying this file. +# +# See the man page for details on how to write a sudoers file. +# +Defaults env_reset +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL:ALL) ALL + +# Members of the admin group may gain root privileges +%admin ALL=(ALL) ALL + +# Allow members of group sudo to execute any command +%sudo ALL=(ALL:ALL) NOPASSWD: ALL + +# See sudoers(5) for more information on "#include" directives: + +#includedir /etc/sudoers.d diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp index 19152c1..999a7aa 100644 --- a/modules/rhizo_base/manifests/init.pp +++ b/modules/rhizo_base/manifests/init.pp @@ -110,6 +110,8 @@ class rhizo_base { include rhizo_base::runit include rhizo_base::openbsc include rhizo_base::lcr + include rhizo_base::sudo + #Rizhomatica scripts file { '/home/rhizomatica/bin': diff --git a/modules/rhizo_base/manifests/sudo.pp b/modules/rhizo_base/manifests/sudo.pp new file mode 100644 index 0000000..4b9030e --- /dev/null +++ b/modules/rhizo_base/manifests/sudo.pp @@ -0,0 +1,27 @@ +# Class: rhizo_base::sudo +# +# This module manages the sudo package +# +# Parameters: none +# +# Actions: +# +# Requires: see Modulefile +# +# Sample Usage: +# +class rhizo_base::sudo { + + package { 'sudo': + ensure => installed, + require => Class['rhizo_base::apt'], + } + + file { '/etc/sudoers': + ensure => present, + source => 'puppet:///modules/rhizo_base/etc/sudoers', + owner => 'root', + group => 'root', + mode => '0440', + } + }