SHARE
TWEET

eric-chen-v3

a guest May 9th, 2018 103 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.   ensure => 'present',
  41.   create_root_user => true,
  42.   root_password           => 'training',
  43.   remove_default_accounts => true,
  44.   service_name            => 'mysql',
  45.   #ensure                  => 'running',
  46.   #grant                   => ['SELECT', 'UPDATE'],
  47. }
  48. class { '::firewall': }
  49.  
  50.   firewall { '000 allow http access':
  51.     port    => '80',
  52.     proto  => 'tcp',
  53.     action => 'accept'
  54.   }
  55.  
  56.   firewall { '001 allow SSH access':
  57.     port    => '22',
  58.     proto  => 'tcp',
  59.     action => 'accept'
  60.   }
  61.  
  62. class { '::apache::mod::php': }
  63.  
  64. class { '::apache':
  65.  
  66.     docroot    => '/var/www/html',
  67.     mpm_module => 'prefork',
  68.     subscribe  => Package[$phpmysql],
  69.  
  70.   }
  71.  
  72. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top