SHARE
TWEET

Untitled

a guest May 9th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class mediawiki {
  2. $phpmysql = $osfamily ? {
  3.     'redhat'  => 'php-mysql',
  4.     'debian'  => 'php5-mysql',
  5.     default   => 'php-mysql',  
  6. }
  7. vcsrepo { '/var/www/html':
  8.     ensure    => 'present',
  9.     provider => 'git',
  10.     source   => "https://github.com/wikimedia/mediawiki.git",
  11.     revision  => 'REL1_23',
  12.   }
  13.   package { $phpmysql:
  14.     ensure  => 'present',
  15.   }
  16. class { '::apache':
  17.     docroot    => '/var/www/html',
  18.     mpm_module => 'prefork',
  19.     subscribe  => Package[$phpmysql],
  20.   }
  21. class { '::apache::mod::php': }
  22. class { '::mysql::server':
  23.   root_password           => 'training',
  24.   remove_default_accounts => true,
  25.   override_options        => $override_options
  26. }
  27. class { '::firewall': }
  28.  
  29.   firewall { '000 allow http access':
  30.     port    => '80',
  31.     proto  => 'tcp',
  32.     action => 'accept'
  33.   }  
  34.  
  35.   firewall { '001 allow SSH access':
  36.     port    => '22',
  37.     proto  => 'tcp',
  38.     action => 'accept'
  39.   }
  40. #File['/var/www/html/index.html'] -> Vcsrepo['/var/www/html']
  41. file  { '/var/www/html/index.html':
  42.     ensure   => 'absent',  
  43.   }
  44. }
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