summaryrefslogtreecommitdiff
path: root/manifests/key.pp
blob: 01856a3cfe617343da131a01098f78fd434bb805 (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
# @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
define dns::key (
  String $algorithm,
  Variant[String, Sensitive[String]] $secret,
  String $keyname = $name,
) {
  concat::fragment { "Dns::Key - ${keyname}":
    target  => $dns::config_file,
    content => epp("${module_name}/key.epp", {
        keyname   => $keyname,
        algorithm => $algorithm,
        secret    => $secret,
    }),
  }
}