summaryrefslogtreecommitdiff
path: root/manifests/key.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-05-05 00:31:37 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-05-05 00:31:37 +0200
commiteb38e6252b3c52a44d0d33679b3bc3178674c7f8 (patch)
treeb7958e38f9893c347af4c04a53f65a103cef3292 /manifests/key.pp
parentInitial commit (diff)
downloaddns-eb38e6252b3c52a44d0d33679b3bc3178674c7f8.tar.gz
dns-eb38e6252b3c52a44d0d33679b3bc3178674c7f8.tar.xz
Everything
Diffstat (limited to 'manifests/key.pp')
-rw-r--r--manifests/key.pp23
1 files changed, 23 insertions, 0 deletions
diff --git a/manifests/key.pp b/manifests/key.pp
new file mode 100644
index 0000000..866bc70
--- /dev/null
+++ b/manifests/key.pp
@@ -0,0 +1,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,
+ }),
+ }
+}