Handle sudo with Puppet
Remove password input on sudo
This commit is contained in:
parent
abae19f92e
commit
f3e880263c
3 changed files with 58 additions and 0 deletions
29
modules/rhizo_base/files/etc/sudoers
Normal file
29
modules/rhizo_base/files/etc/sudoers
Normal file
|
@ -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
|
|
@ -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':
|
||||
|
|
27
modules/rhizo_base/manifests/sudo.pp
Normal file
27
modules/rhizo_base/manifests/sudo.pp
Normal file
|
@ -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',
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue