summaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: 5dd5dd909ee8f16ef2be6d66cf2c039637676866 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# This classes manage a puppet installation, and provide for a puppetd
# service and a puppetmasterd service, the latter constantly updated by a
# cron-job which git-pushes from '/var/git/repositories/puppet.git'.

# guarantees puppet user, group and ownerships
class puppet {
  user { "puppet":
    ensure    => present,
    allowdupe => false,
  }

  group { "puppet":
    ensure    => present,
    allowdupe => false,
  }

  file { "/etc/puppet":
    ensure  => directory,
    owner   => puppet,
    group   => puppet, 
    mode    => 0640,
    require => User["puppet"],
  }

  file { "/etc/puppet/manifests":
    ensure  => directory,
    owner   => puppet,
    group   => puppet, 
    recurse => inf,
    require => User["puppet"],
  }

  file { "/etc/puppet/modules":
    ensure  => directory,
    owner   => puppet,
    group   => puppet, 
    recurse => inf,
    require => User["puppet"],
  }

  file { "/etc/puppet/templates":
    ensure  => directory,
    owner   => puppet,
    group   => puppet, 
    recurse => inf,
    require => User["puppet"],
  }
}