9c4d6fc6ec
respect style from best practices. this makes the code a lot easier to read. also change groups from "root" to "0" to make them more portable (e.g. in freebsd, the admin group is "wheel" but has gid "0")
19 lines
518 B
Puppet
19 lines
518 B
Puppet
class sudo {
|
|
package { 'sudo': ensure => installed, }
|
|
|
|
file { '/etc/sudoers':
|
|
source => ["puppet:///secrets/sudoers.${::fqdn}",
|
|
'puppet:///secrets/sudoers' ],
|
|
mode => '0440',
|
|
owner => 'root',
|
|
group => 0,
|
|
require => Package['sudo'],
|
|
}
|
|
if $::operatingsystem == 'FreeBSD' {
|
|
File['/etc/sudoers'] {
|
|
path => '/usr/local/etc/sudoers',
|
|
source => [ "puppet:///secrets/sudoers.${::fqdn}",
|
|
'puppet:///secrets/sudoers.FreeBSD' ],
|
|
}
|
|
}
|
|
}
|