SHARE
TWEET

init.pp

a guest Apr 25th, 2018 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   1 class apt-update {
  2.   2     exec { 'apt-update':
  3.   3     command => '/usr/bin/apt-get update'
  4.   4 }
  5.   5
  6.   6 class apache-reload {
  7.   7     exec { 'apache-reload':
  8.   8     command => '/etc/init.d/apache2 reload'
  9.   9     }
  10.  10 }
  11.  11
  12.  12 class apache2 {
  13.  13     package {'apache2':
  14.  14         require => Exec['apt-update'],
  15.  15         ensure => latest,
  16.  16     }
  17.  17
  18.  18     package { 'php5':
  19.  19         require => Exec['apt-update'],
  20.  20         ensure => installed,
  21.  21     }
  22.  22
  23.  23     service {'apache2':
  24.  24         ensure => running,
  25.  25         enable => true,
  26.  26         require => Package['apache2'],
  27.  27         require => Exec['apache-reload'],
  28.  28     }
  29.  29
  30.  30     file { '/etc/apache2/apache2.conf':
  31.  31         ensure => file,
  32.  32         mode => 600,
  33.  33         source => '/home/v.korol_pro/apache_module/files/apache2.conf',
  34.  34     }
  35.  35 }
  36.  36
  37.  37 node /^mon-test-vm-01(\d+)$/ {
  38.  38     include apache2
  39.  39     include apache-reload
  40.  40     unclude apt-update
  41.  41     }
  42.  42 }
  43.  43
  44.  44 node default {
  45.  45     include apache2
  46.  46 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top