SHARE
TWEET

echen-init.pp

a guest May 9th, 2018 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class mediawiki {
  2.  
  3.   $phpmysql = $osfamily ? {
  4.     'redhat'  => 'php-mysql',
  5.     'debian'  => 'php5-mysql',
  6.     default   => 'php-mysql',
  7.   }
  8.  
  9.   package { $phpmysql:
  10.     ensure  => 'present',
  11.   }
  12.  
  13.   if $osfamily == 'redhat' {
  14.   package { 'php-xml':
  15.     ensure => 'present',
  16.     }
  17.   }
  18.  
  19.  file  { '/var/www/html/index.html':
  20.     ensure => 'absent',
  21.  
  22.   }
  23.  
  24.  file { 'LocalSettings.php':
  25.     path    => '/var/www/html/LocalSettings.php',
  26.     ensure  => 'file',
  27.     content => template('/etc/puppetlabs/code/environments/production/modules/mediawiki/templates/LocalSettings.erb'),
  28.   }
  29.  
  30.  vcsrepo { '/var/www/html':
  31.     ensure  => 'present',
  32.     provider => 'git',
  33.     source   => "https://github.com/wikimedia/mediawiki.git",
  34.     revision  => 'REL1_23',
  35.   }
  36.  
  37.     File['/var/www/html/index.html'] -> Vcsrepo['/var/www/html']
  38.  
  39. class { '::mysql::server':
  40.   root_password           => 'training',
  41.  
  42. }
  43. class { '::firewall': }
  44.  
  45.   firewall { '000 allow http access':
  46.     port    => '80',
  47.     proto  => 'tcp',
  48.     action => 'accept'
  49.   }
  50.  
  51.   firewall { '001 allow SSH access':
  52.     port    => '22',
  53.     proto  => 'tcp',
  54.     action => 'accept'
  55.   }
  56.  
  57.  
  58. class { '::apache':
  59.  
  60.     docroot    => '/var/www/html',
  61.     mpm_module => 'prefork',
  62.     subscribe  => Package[$phpmysql],
  63.  
  64.   }
  65. class { '::apache::mod::php': }
  66.  
  67. }
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