| Index: modules/adblockplus/manifests/web/static/hook.pp |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/modules/adblockplus/manifests/web/static/hook.pp |
| @@ -0,0 +1,38 @@ |
| +# == Type: adblockplus::web::static::hook |
| +# |
| +# Manage custom hooks to be triggered via ssh commands |
| +# |
| +# === Parameters: |
| +# |
| +# [*file*] |
| +# Overwrite the default configuration for the hook. |
|
mathias
2018/04/05 01:12:30
This is not a default but totally necessary, in th
f.lopez
2018/04/10 02:45:39
Acknowledged.
|
| +# |
| +# === Examples: |
| +# |
| +# adblockplus::web::static::hook {'deploy': |
| +# 'file' => { |
| +# source => 'puppet:///modules/adblockplus/web/deploy.py', |
| +# path => '/usr/local/bin/deploy.py', |
| +# }, |
| +# } |
| +# |
| +# adblockplus::web::static::hook {'uname': |
| +# 'file' => { |
| +# content => 'uname -a', |
| +# }, |
| +# } |
| +# |
| +define adblockplus::web::static::hook ( |
| + $file = {}, |
| +) { |
| + |
| + ensure_resource('file', "hook#${name}", merge({ |
|
mathias
2018/04/05 01:12:30
When composing titles, which are required to be un
f.lopez
2018/04/10 02:45:39
Acknowledged.
|
| + mode => '0755', |
| + owner =>$adblockplus::web::static::deploy_user, |
|
mathias
2018/04/05 01:12:30
There's a space missing here.
f.lopez
2018/04/10 02:45:39
Acknowledged.
|
| + group => $adblockplus::web::static::deploy_user, |
| + }, $file, { |
| + ensure => ensure_file_state($adblockplus::web::static::ensure), |
| + path => "/home/$adblockplus::web::static::deploy_user/bin/${name}", |
|
mathias
2018/04/05 01:12:30
Both variables should be denoted with the `${}` sy
f.lopez
2018/04/10 02:45:39
Acknowledged.
|
| + })) |
| +} |
| + |