summaryrefslogtreecommitdiff
path: root/manifests/key.pp
blob: 866bc70ad2b66e82cbbaafc384758a7f984f0049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# @summary A single dns key (for zone updates and the like)
# 
# TODO add stuff to autogenerate these, and insntead dump them to individual files.
#
# @param algorithm
#   Algorithm used, must match secret
# @param secret
#   Secret hash, must match algorithm
# @param keyname
#   Name of key
class dns::key (
  String $algorithm,
  Option[String, Sensitive[String]] $secret,
  String $keyname = $name,
) {
  concat::fragment { "Dns::Key - ${keyname}":
    content => epp("${module_name}/key.epp", {
        keyname   => $keyname,
        algorithm => $algorithm,
        secret    => $secret,
    }),
  }
}