wp_4x: now working on stretch + wheezy

This commit is contained in:
ts
2019-01-22 15:47:47 +00:00
parent 1b532c7e64
commit 959df009e1
2 changed files with 28 additions and 11 deletions

View File

@@ -15,23 +15,44 @@ class wordpress_4x {
class { '::apache':
default_vhost => false,
overwrite_ports => false,
mpm_module => 'prefork',
default_mods => ['rewrite', 'php'],
}
class {'::apache::mod::rewrite': }
if $https {
apache::vhost { 'wordpress':
::apache::vhost { 'wordpress':
docroot => '/var/www/wordpress',
port => '80',
redirect_status => 'permanent',
redirect_dest => "https://$ip_address/"
}
::apache::vhost { 'wordpress-ssl':
docroot => '/var/www/wordpress',
port => '443',
ssl => true,
}
} else {
apache::vhost { 'wordpress':
::apache::vhost { 'wordpress':
docroot => '/var/www/wordpress',
port => $port,
}
}
case $operatingsystemrelease {
/^9.*/: { # do 9.x stretch stuff
exec { 'a2enmod php5.6':
command => '/usr/sbin/a2enmod php5.6',
require => Class['::apache']
}
}
/^7.*/: { #do 7.x wheezy stuff
exec { 'a2enmod php5':
command => '/usr/sbin/a2enmod php5',
require => Class['::apache']
}
}
}
class { '::wordpress':
install_dir => '/var/www/wordpress',
version => $version,

View File

@@ -55,10 +55,6 @@
<generator type="username_generator"/>
</default_input>
<conflict>
<name>Wheezy</name>
</conflict>
<requires>
<module_path>.*/puppet_module/wordpress</module_path>
</requires>
@@ -68,15 +64,15 @@
</requires>
<requires>
<module_path>.*/apache_stretch.*</module_path>
<module_path>.*apache.*compatible.*</module_path>
</requires>
<requires>
<module_path>.*/mysql_stretch.*</module_path>
<module_path>.*mysql.*compatible.*</module_path>
</requires>
<requires>
<module_path>.*/php_stretch.*</module_path>
<module_path>.*php_5.*compatible.*</module_path>
</requires>
</vulnerability>