summaryrefslogtreecommitdiff
path: root/global/overlay/etc/puppet/modules/sunet/manifests
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2015-03-06 15:51:54 +0100
committerLeif Johansson <leifj@sunet.se>2015-03-06 15:51:54 +0100
commit2132b2f78aa30ef860f2e6b152fa60dd0c151724 (patch)
tree3aecdec01a7a7f09051c3d15ff5f3c243c419dec /global/overlay/etc/puppet/modules/sunet/manifests
parent1bbaf98b8c4c673dfaa622f7ab1a7fcef0518ca5 (diff)
Diffstat (limited to 'global/overlay/etc/puppet/modules/sunet/manifests')
-rw-r--r--global/overlay/etc/puppet/modules/sunet/manifests/wordpress.pp6
1 files changed, 4 insertions, 2 deletions
diff --git a/global/overlay/etc/puppet/modules/sunet/manifests/wordpress.pp b/global/overlay/etc/puppet/modules/sunet/manifests/wordpress.pp
index 75eed96..8465e79 100644
--- a/global/overlay/etc/puppet/modules/sunet/manifests/wordpress.pp
+++ b/global/overlay/etc/puppet/modules/sunet/manifests/wordpress.pp
@@ -12,11 +12,12 @@ $myqsl_version = "5.7")
}
$sanitized_name = regsubst($name, '[^0-9A-Za-z.\-]', '-', 'G')
$pwd = hiera('${sanitized_name}_db_password','NOT_SET_IN_HIERA')
+ file {"/data/${sanitized_name}/html": ensure => directory }
sunet::docker_run {
name => "wordpress_${sanitized_name}",
image => "wordpress",
imagetag => $wordpress_version,
- volumes => ["/data/${sanitized_name}/html":"/var/www/html"],
+ volumes => ["/data/${sanitized_name}/html:/var/www/html"],
port => ["8080:80"]
environment => [ "WORDPRESS_DB_HOST=${db_hostname}",
"WORDPRESS_DB_USER=${sanitized_name}",
@@ -25,11 +26,12 @@ $myqsl_version = "5.7")
}
if (!$db_host) {
+ file {"/data/${sanitized_name}/db": ensure => directory }
sunet::docker_run {
name => "mysql_${sanitized_name}",
image => "mysql",
imagetag => $mysql_version,
- volumes => ["/data/${sanitized_name}/db":"/var/lib/mysql"],
+ volumes => ["/data/${sanitized_name}/db:/var/lib/mysql"],
environment => ["MYSQL_USER=${sanitized_name}",
"MYSQL_PASSWORD=${pwd}",
"MYSQL_ROOT_PASSWORD=${pwd}",