Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class mediawiki {
- $phpmysql = $osfamily ? {
- 'redhat' => 'php-mysql',
- 'debian' => 'php5-mysql',
- default => 'php-mysql',
- }
- package { $phpmysql:
- ensure => 'present',
- }
- if $osfamily == 'redhat' {
- package { 'php-xml':
- ensure => 'present',
- }
- }
- file { '/var/www/html/index.html':
- ensure => 'absent',
- }
- file { 'LocalSettings.php':
- path => '/var/www/html/LocalSettings.php',
- ensure => 'file',
- content => template('/etc/puppetlabs/code/environments/production/modules/mediawiki/templates/LocalSettings.erb'),
- }
- vcsrepo { '/var/www/html':
- ensure => 'present',
- provider => 'git',
- source => "https://github.com/wikimedia/mediawiki.git",
- revision => 'REL1_23',
- }
- File['/var/www/html/index.html'] -> Vcsrepo['/var/www/html']
- class { '::mysql::server':
- root_password => 'training',
- }
- class { '::firewall':
- firewall { '000 allow http access':
- port => '80',
- proto => 'tcp',
- action => 'accept'
- }
- firewall { '001 allow SSH access':
- port => '22',
- proto => 'tcp',
- action => 'accept'
- }
- }
- class { '::apache::mod::php': }
- class { '::apache':
- docroot => '/var/www/html',
- mpm_module => 'prefork',
- subscribe => Package[$phpmysql],
- }
- }
- ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement