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: For comments 8 and 9 Created April 17, 2018, 6:02 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
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,40 @@
+# == 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',
mathias 2018/04/17 19:28:04 Maybe here as well?
f.lopez 2018/04/17 19:52:48 Acknowledged.
+# },
+# }
+#
+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,
+ }, $file, {
+ mode => '0755',
+ owner => $adblockplus::web::static::deploy_user,
+ ensure => ensure_file_state($adblockplus::web::static::ensure),
+ path => $hook_path,
+ }))
+}
+

Powered by Google App Engine
This is Rietveld