-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.pp
40 lines (39 loc) · 807 Bytes
/
init.pp
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
#Class that can be referenced by any manifest
class disney
{
#Exec resource name: apt-update
exec
{
'apt-update':
command => '/usr/bin/apt-get update'
}
#Package to be installed
package
{
'apache2':
require => Exec['apt-update'], # require 'apt-update' before installing
ensure => installed,
}
# ensure apache2 service is running
service
{
'apache2':
ensure => running,
}
#File resource to copy test.html on agent
file
{
'/var/www/html/test.html':
ensure => present,
mode => 0644,
content => file("/etc/puppet/modules/disney/files/test.html")
}
#File resource to copy default-ssl on agent
file
{
'/etc/apache2/sites-available/default-ssl':
ensure => present,
mode => 0644,
content => file("/etc/puppet/modules/disney/files/default-ssl")
}
}