Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/adblockplus/manifests/web/static/hook.pp

Issue 29733731: #7320 - Introduce helpcenter role (Closed)
Left Patch Set: A bit more documentation Created April 17, 2018, 7:58 p.m.
Right Patch Set: Make documentation right Created April 17, 2018, 8:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « modules/adblockplus/manifests/web/static.pp ('k') | modules/adblockplus/templates/web/hooks_wrapper.sh.erb » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # == Type: adblockplus::web::static::hook 1 # == Type: adblockplus::web::static::hook
2 # 2 #
3 # Manage custom hooks to be triggered via ssh commands 3 # Manage custom hooks to be triggered via ssh commands
4 # 4 #
5 # === Parameters: 5 # === Parameters:
6 # 6 #
7 # [*file*] 7 # [*file*]
8 # Overwrite group and the source of the content of the file. 8 # Overwrite group and the source of the content of the file.
9 # 9 #
10 # === Examples: 10 # === Examples:
11 # 11 #
12 # adblockplus::web::static::hook {'deploy': 12 # adblockplus::web::static::hook {'deploy':
13 # 'file' => { 13 # file => {
14 # source => 'puppet:///modules/adblockplus/web/deploy.py', 14 # source => 'puppet:///modules/adblockplus/web/deploy.py',
15 # path => '/usr/local/bin/deploy.py', 15 # path => '/usr/local/bin/deploy.py',
16 # }, 16 # },
17 # } 17 # }
18 # 18 #
19 # adblockplus::web::static::hook {'uname': 19 # adblockplus::web::static::hook {'uname':
20 # 'file' => { 20 # file => {
21 # content => 'uname -a', 21 # content => 'uname -a',
22 # }, 22 # },
23 # } 23 # }
24 # 24 #
25 # adblockplus::web::static::hook {'uptime': 25 # adblockplus::web::static::hook {'uptime':
26 # 'file' => { 26 # file => {
27 # target: '/usr/bin/uptime', 27 # target => '/usr/bin/uptime',
28 # ensure: 'link', 28 # ensure => 'link',
29 # }, 29 # },
30 # } 30 # }
31 # 31 #
32 define adblockplus::web::static::hook ( 32 define adblockplus::web::static::hook (
33 $file, 33 $file,
34 ) { 34 ) {
35 35
36 $hook_path = "/home/${adblockplus::web::static::deploy_user}/bin/${name}" 36 $hook_path = "/home/${adblockplus::web::static::deploy_user}/bin/${name}"
37 37
38 ensure_resource('file', "web-deploy-hook#${title}", merge({ 38 ensure_resource('file', "web-deploy-hook#${title}", merge({
39 group => $adblockplus::web::static::deploy_user, 39 group => $adblockplus::web::static::deploy_user,
40 ensure => ensure_file_state($adblockplus::web::static::ensure), 40 ensure => ensure_file_state($adblockplus::web::static::ensure),
41 }, $file, { 41 }, $file, {
42 mode => '0755', 42 mode => '0755',
43 owner => $adblockplus::web::static::deploy_user, 43 owner => $adblockplus::web::static::deploy_user,
44 path => $hook_path, 44 path => $hook_path,
45 })) 45 }))
46 } 46 }
47 47
LEFTRIGHT

Powered by Google App Engine
This is Rietveld