SHARE
TWEET

Untitled

a guest May 9th, 2018 88 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('mediawiki/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.  
  40. class { '::mysql::server':
  41.   ensure => 'present',
  42.   create_root_user => true,
  43.   root_password           => 'training',
  44.   remove_default_accounts => true,
  45.   service_name            => 'mysql',
  46.   ensure                  => 'running',
  47.   grant                   => ['SELECT', 'UPDATE'],
  48. }
  49. class { '::firewall': }
  50.  
  51.   firewall { '000 allow http access':
  52.     port    => '80',
  53.     proto  => 'tcp',
  54.     action => 'accept'
  55.   }
  56.  
  57.   firewall { '001 allow SSH access':
  58.     port    => '22',
  59.     proto  => 'tcp',
  60.     action => 'accept'
  61.   }
  62.  
  63. class { '::apache::mod::php': }
  64.  
  65. class { '::apache':
  66.  
  67.     docroot    => '/var/www/html',
  68.     mpm_module => 'prefork',
  69.     subscribe  => Package[$phpmysql],
  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