Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 # == Type: adblockplus::web::static::hook | |
2 # | |
3 # Manage custom hooks to be triggered via ssh commands | |
4 # | |
5 # === Parameters: | |
6 # | |
7 # [*file*] | |
8 # Overwrite group and the source of the content of the file. | |
9 # | |
10 # === Examples: | |
11 # | |
12 # adblockplus::web::static::hook {'deploy': | |
13 # 'file' => { | |
14 # source => 'puppet:///modules/adblockplus/web/deploy.py', | |
15 # path => '/usr/local/bin/deploy.py', | |
16 # }, | |
17 # } | |
18 # | |
19 # adblockplus::web::static::hook {'uname': | |
20 # 'file' => { | |
21 # content => 'uname -a', | |
mathias
2018/04/17 19:28:04
Maybe here as well?
f.lopez
2018/04/17 19:52:48
Acknowledged.
| |
22 # }, | |
23 # } | |
24 # | |
25 define adblockplus::web::static::hook ( | |
26 $file = {}, | |
27 ) { | |
28 | |
29 $hook_path = "/home/${adblockplus::web::static::deploy_user}/bin/${name}" | |
30 | |
31 ensure_resource('file', "web-deploy-hook#${title}", merge({ | |
32 group => $adblockplus::web::static::deploy_user, | |
33 }, $file, { | |
34 mode => '0755', | |
35 owner => $adblockplus::web::static::deploy_user, | |
36 ensure => ensure_file_state($adblockplus::web::static::ensure), | |
37 path => $hook_path, | |
38 })) | |
39 } | |
40 | |
OLD | NEW |