Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
hooks: Add a helper to install a single static file.
Alex Vandiver160a917ad393
diff --git a/puppet/zulip/manifests/hooks/file.pp b/puppet/zulip/manifests/hooks/file.ppnew file mode 100644index 00000000000..5fe5f87b2f6--- /dev/null+++ b/puppet/zulip/manifests/hooks/file.pp@@ -0,0 +1,14 @@+# @summary Install a static hook file+#+define zulip::hooks::file() {+ include zulip::hooks::base++ file { "/etc/zulip/hooks/${title}":+ ensure => file,+ mode => '0755',+ owner => 'zulip',+ group => 'zulip',+ source => "puppet:///modules/zulip/hooks/${title}",+ tag => ['hooks'],+ }+}diff --git a/puppet/zulip/manifests/hooks/sentry.pp b/puppet/zulip/manifests/hooks/sentry.ppindex 61e25c00db9..eafd132c965 100644--- a/puppet/zulip/manifests/hooks/sentry.pp+++ b/puppet/zulip/manifests/hooks/sentry.pp@@ -20,20 +20,5 @@ class zulip::hooks::sentry {target => $bin,}- file { '/etc/zulip/hooks/pre-deploy.d/sentry.hook':- ensure => file,- mode => '0755',- owner => 'zulip',- group => 'zulip',- source => 'puppet:///modules/zulip/hooks/pre-deploy.d/sentry.hook',- tag => ['hooks'],- }- file { '/etc/zulip/hooks/post-deploy.d/sentry.hook':- ensure => file,- mode => '0755',- owner => 'zulip',- group => 'zulip',- source => 'puppet:///modules/zulip/hooks/post-deploy.d/sentry.hook',- tag => ['hooks'],- }+ zulip::hooks::file { ['pre-deploy.d/sentry.hook', 'post-deploy.d/sentry.hook']: }}