Puppet Class: sudo

Defined in:
modules/sudo/manifests/init.pp

Overview

param purge_sudoers_d if true purge unmanaged resources from /etc/sudoers.d

Parameters:

  • purge_sudoers_d (Boolean) (defaults to: false)


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'modules/sudo/manifests/init.pp', line 3

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,
    }
}