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

Unified Diff: modules/adblockplus/manifests/web/static/hook.pp

Issue 29733731: #7320 - Introduce helpcenter role (Closed)
Patch Set: A bit more documentation Created April 17, 2018, 7:58 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/adblockplus/manifests/web/static.pp ('k') | modules/adblockplus/templates/web/hooks_wrapper.sh.erb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,47 @@
+# == Type: adblockplus::web::static::hook
+#
+# Manage custom hooks to be triggered via ssh commands
+#
+# === Parameters:
+#
+# [*file*]
+# Overwrite group and the source of the content of the file.
+#
+# === 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',
+# },
+# }
+#
+# adblockplus::web::static::hook {'uptime':
+# 'file' => {
+# target: '/usr/bin/uptime',
+# ensure: 'link',
+# },
+# }
+#
+define adblockplus::web::static::hook (
+ $file,
+) {
+
+ $hook_path = "/home/${adblockplus::web::static::deploy_user}/bin/${name}"
+
+ ensure_resource('file', "web-deploy-hook#${title}", merge({
+ group => $adblockplus::web::static::deploy_user,
+ ensure => ensure_file_state($adblockplus::web::static::ensure),
+ }, $file, {
+ mode => '0755',
+ owner => $adblockplus::web::static::deploy_user,
+ path => $hook_path,
+ }))
+}
+
« no previous file with comments | « modules/adblockplus/manifests/web/static.pp ('k') | modules/adblockplus/templates/web/hooks_wrapper.sh.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld