Puppet Class: sudo
- Defined in:
- modules/sudo/manifests/init.pp
Summary
manage sudoersOverview
SPDX-License-Identifier: Apache-2.0 param purge_sudoers_d if true purge unmanaged resources from /etc/sudoers.d
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'modules/sudo/manifests/init.pp', line 4
class sudo (
Boolean $purge_sudoers_d = false,
) {
package { 'sudo':
ensure => installed,
}
file { '/etc/sudoers':
ensure => present,
mode => '0440',
owner => 'root',
group => 'root',
source => 'puppet:///modules/sudo/sudoers',
require => Package[sudo],
validate_cmd => '/usr/sbin/visudo -c -f %'
}
file {'/etc/sudoers.d':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
purge => $purge_sudoers_d,
recurse => $purge_sudoers_d,
}
file { '/etc/sudoers.d/README':
ensure => absent,
}
}
|