Puppet Class: dokuwiki::install
- Defined in:
- manifests/install.pp
Summary
Main installation of dokuwikiOverview
dokuwiki::install
Main installation of dokuwiki
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'manifests/install.pp', line 9
class dokuwiki::install {
$manage_webserver = $dokuwiki::manage_webserver
$manage_php = $dokuwiki::manage_php
if $manage_webserver {
class {'apache':
mpm_module => 'prefork',
default_vhost => false,
default_mods => false,
}
}
if $manage_php and $manage_webserver {
exec {'disable mpm_event':
command => 'rm /etc/apache2/mods-enabled/mpm_event.load',
path => ['/usr/sbin', '/bin'],
onlyif => 'a2query -m mpm_event',
require => Package['httpd'],
before => Class['apache::mod::php']
}
class {'apache::mod::php':
}
package {'php7.0-xml':
notify => Service['httpd'],
}
}
# Install requirements for archive module
package { 'curl':
ensure => present,
}
package { 'tar':
ensure => present,
}
Archive {
require => Package['curl', 'tar'],
}
file {$dokuwiki::install_path:
ensure => directory,
owner => $dokuwiki::user,
group => $dokuwiki::group,
}
# Install Dokuwiki
archive {'dokuwiki_tar':
path => "${dokuwiki::tmp_dir}/${dokuwiki::archive}",
source => $dokuwiki::download_link,
extract => true,
extract_path => $dokuwiki::install_path,
creates => "${dokuwiki::install_path}/dokuwiki",
cleanup => false,
user => $dokuwiki::user,
group => $dokuwiki::group,
require => [Class['apache'], File[$dokuwiki::install_path]],
}
-> file {'/usr/local/bin/symlink':
ensure => file,
content => template('dokuwiki/symlink.sh.erb'),
mode => '0755'
}
-> exec {'/usr/local/bin/symlink':
creates => "${dokuwiki::install_path}/dokuwiki",
subscribe => Archive['dokuwiki_tar'],
refreshonly => true,
}
-> apache::vhost { 'dokuwiki':
port => '80',
manage_docroot => false,
override => 'All',
docroot => "${dokuwiki::install_path}/dokuwiki",
}
}
|