owner => $user,
group => $group,
require => User["$user:"],
+ } ->
+ file { "${home}/media":
+ ensure => "directory",
+ mode => "0755",
+ owner => "http",
+ group => "http",
}
exec { "initialize_venv":
require => [User["$user:"], File["$caldance_app/manage.py"]],
refreshonly => true,
} ~>
+ exec { "py-symlink-file":
+ cwd => $caldance_app,
+ user => $user,
+ environment => concat(["HOME=${home}"], $shell_env),
+ command => "/usr/bin/ln -sf ${home}/media www/media",
+ require => [User["$user:"], File["$caldance_app/manage.py"]],
+ refreshonly => true,
+ } ~>
exec { "reload httpd":
command => "/usr/bin/systemctl reload httpd",
require => [User["$user:"], File["$caldance_app/manage.py"]],