summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/manifests/base.pp
blob: bd0a42859ff2fc67285b505f2b222e0d0de2a08d (plain)
1
2
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
28
class profiles::base (
  $admins = [],
  $users = {},
) {
  # ensure admin users for this container
  $admins.each |String $username| {
    $user = $users[$username]
    group { $user['username']:
      ensure => present,
    } ->
    user { $user['username']:
      ensure   => present,
      comment  => $user['fullname'],
      gid      => $user['username'],
      groups   => ['sudo', 'adm'],
      password => $user['password'],
      uid      => $user['uid'],
    }
  }

  file { '/etc/init.d/puppet':
    ensure => file,
    owner  => 'root',
    group  => 'root',
    mode   => '0755',
    source => 'puppet:///modules/profiles/puppet.init',
  }
}