aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-08 13:23:24 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-13 16:47:00 +0200
commit459e12d0a5dc1984ae9642f6aa453f371d2d161f (patch)
treed394984a72df4d79c6d49116123f5ab157c86524 /modules
parent4e8486c1a0453209043480eaf8b5769e70864420 (diff)
downloadPuppet-459e12d0a5dc1984ae9642f6aa453f371d2d161f.tar.gz
Puppet-459e12d0a5dc1984ae9642f6aa453f371d2d161f.tar.zst
Puppet-459e12d0a5dc1984ae9642f6aa453f371d2d161f.zip
Add media directory for caldance
Diffstat (limited to 'modules')
-rw-r--r--modules/role/manifests/caldance.pp14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/role/manifests/caldance.pp b/modules/role/manifests/caldance.pp
index f44455f..2794e00 100644
--- a/modules/role/manifests/caldance.pp
+++ b/modules/role/manifests/caldance.pp
@@ -61,6 +61,12 @@ class role::caldance (
61 owner => $user, 61 owner => $user,
62 group => $group, 62 group => $group,
63 require => User["$user:"], 63 require => User["$user:"],
64 } ->
65 file { "${home}/media":
66 ensure => "directory",
67 mode => "0755",
68 owner => "http",
69 group => "http",
64 } 70 }
65 71
66 exec { "initialize_venv": 72 exec { "initialize_venv":
@@ -107,6 +113,14 @@ class role::caldance (
107 require => [User["$user:"], File["$caldance_app/manage.py"]], 113 require => [User["$user:"], File["$caldance_app/manage.py"]],
108 refreshonly => true, 114 refreshonly => true,
109 } ~> 115 } ~>
116 exec { "py-symlink-file":
117 cwd => $caldance_app,
118 user => $user,
119 environment => concat(["HOME=${home}"], $shell_env),
120 command => "/usr/bin/ln -sf ${home}/media www/media",
121 require => [User["$user:"], File["$caldance_app/manage.py"]],
122 refreshonly => true,
123 } ~>
110 exec { "reload httpd": 124 exec { "reload httpd":
111 command => "/usr/bin/systemctl reload httpd", 125 command => "/usr/bin/systemctl reload httpd",
112 require => [User["$user:"], File["$caldance_app/manage.py"]], 126 require => [User["$user:"], File["$caldance_app/manage.py"]],