Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 class apt-update {
- 2 exec { 'apt-update':
- 3 command => '/usr/bin/apt-get update'
- 4 }
- 5
- 6 class apache-reload {
- 7 exec { 'apache-reload':
- 8 command => '/etc/init.d/apache2 reload'
- 9 }
- 10 }
- 11
- 12 class apache2 {
- 13 package {'apache2':
- 14 require => Exec['apt-update'],
- 15 ensure => latest,
- 16 }
- 17
- 18 package { 'php5':
- 19 require => Exec['apt-update'],
- 20 ensure => installed,
- 21 }
- 22
- 23 service {'apache2':
- 24 ensure => running,
- 25 enable => true,
- 26 require => Package['apache2'],
- 27 require => Exec['apache-reload'],
- 28 }
- 29
- 30 file { '/etc/apache2/apache2.conf':
- 31 ensure => file,
- 32 mode => 600,
- 33 source => '/home/v.korol_pro/apache_module/files/apache2.conf',
- 34 }
- 35 }
- 36
- 37 node /^mon-test-vm-01(\d+)$/ {
- 38 include apache2
- 39 include apache-reload
- 40 include apt-update
- 41 }
- 42 }
- 43
- 44 node default {
- 45 include apache2
- 46 }
- ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement