diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-29 20:13:55 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-29 20:13:55 +0100 |
commit | d04542e000b8f8fadce45af96d93fb904ca99115 (patch) | |
tree | e85ee2bb0472d9f83f051f31d2629bf4c96bb755 /modules/pacman/templates/hook.epp | |
parent | Setup new site.pp. (diff) | |
parent | Migrate stuff from ansible. (diff) | |
download | webdav_server-d04542e000b8f8fadce45af96d93fb904ca99115.tar.gz webdav_server-d04542e000b8f8fadce45af96d93fb904ca99115.tar.xz |
Merge branch 'master' of /home/hugo/puppet into production
Diffstat (limited to 'modules/pacman/templates/hook.epp')
-rw-r--r-- | modules/pacman/templates/hook.epp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/pacman/templates/hook.epp b/modules/pacman/templates/hook.epp new file mode 100644 index 0000000..08377d9 --- /dev/null +++ b/modules/pacman/templates/hook.epp @@ -0,0 +1,31 @@ +<%- | Array[Pacman::Trigger] $triggers, + Optional[String] $description, + String $exec, + Enum['PreTransation', 'PostTransaction'] $when, + Array[String] $depends, + Boolean $abortOnFail, + Boolean $needsTargets, + +| -%> +# Managed by Puppet + +[Trigger] +<%- $triggers.each |$trigger| { -%> +Type = <%= $trigger['type'] %> +<%- $trigger['operation'].each |$op| { -%> +Operation = <%= $op %> +<%- } -%> +<% $trigger['target'].each |$target| { -%> +Target = <%= $target %> +<%- } -%> +<%- } %> + +[Action] +<%- if ($description) { -%>Description = <%= $description %><% } %> +Exec = <%= $exec %> +When = <%= $when %> +<%- $depends.each |$depend| { -%> +Depends = <%= $depend %> +<%- } -%> +<%- if ($abortOnFail) { -%>AbortOnFail<% } %> +<%- if ($needsTargets) { -%>NeedsTargets<% } %> |