summaryrefslogtreecommitdiff
path: root/templates/hook.epp
blob: bdc4c1543eae57ec66c1be0d115957d0f7c7fefc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<%- | Array[Pacman::Trigger] $triggers,
      Optional[String] $description,
      String $exec,
      Enum['PreTransation', 'PostTransaction'] $when,
      Array[String] $depends,
      Boolean $abort_on_fail,
      Boolean $needs_targets,
      
| -%>
# 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 ($abort_on_fail) { -%>AbortOnFail<% } %>
<%- if ($needs_targets) { -%>NeedsTargets<% } %>