X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fsudo%2Fmanifests%2Finit.pp;h=1c0ea0155fcfc0127fe95b6600fce0519f21300a;hb=25cee51c183c4f8d97b380314ad50075bc7d04e6;hp=a2f2278eaad81c2914922bc54d2558f6b34abcf5;hpb=f2c18a30f44bfbbb4340aea7110ecf782f31b2d7;p=mirror%2Fdsa-puppet.git diff --git a/modules/sudo/manifests/init.pp b/modules/sudo/manifests/init.pp index a2f2278ea..1c0ea0155 100644 --- a/modules/sudo/manifests/init.pp +++ b/modules/sudo/manifests/init.pp @@ -1,8 +1,11 @@ +# Debian.org's sudo setup class sudo { - - package { 'sudo': - ensure => installed - } + ensure_packages ( [ + 'sudo', + 'libpam-pwdfile', + ], { + ensure => 'installed', + }) file { '/etc/pam.d/sudo': source => 'puppet:///modules/sudo/pam', @@ -14,4 +17,24 @@ class sudo { source => 'puppet:///modules/sudo/sudoers', require => Package['sudo'], } + + file { '/etc/sudoers.d': + ensure => directory, + mode => '755', + purge => true, + recurse => true, + force => true, + source => 'puppet:///files/empty/', + } + file { '/etc/sudoers.d/README': + mode => '440', + content => @(EOT), + # According to the README shipped with Debian 10, + # this directory, if included in /etc/sudoers, needs + # to contain at least one file. Files which end in + # a '~' character or that contain a '.' are ignored. + # + # Files should be mode 0440 and be edited with visudo. + | EOT + } }