hooks: Add a helper to install a single static file.

This commit is contained in:
Alex Vandiver 2023-04-05 14:42:05 +00:00 committed by Alex Vandiver
parent 0c13bacb89
commit 160a917ad3
2 changed files with 15 additions and 16 deletions

View File

@ -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'],
}
}

View File

@ -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']: }
}