summaryrefslogtreecommitdiff
path: root/manifests/key.pp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--manifests/key.pp9
1 files changed, 7 insertions, 2 deletions
diff --git a/manifests/key.pp b/manifests/key.pp
index c5bdb55..b36bf35 100644
--- a/manifests/key.pp
+++ b/manifests/key.pp
@@ -8,13 +8,18 @@
# Secret hash, must match algorithm
# @param keyname
# Name of key
+# @param ensure
+# Allows for manual removal of the key. Note that if
+# $dns::purge_keyconf is true then simply removing the
+# dns::key resource removes the file.
define dns::key (
String $algorithm,
Variant[String, Sensitive[String]] $secret,
String $keyname = $name,
+ Enum['present', 'absent'] $ensure = 'present',
) {
- concat::fragment { "Dns::Key - ${keyname}":
- target => $dns::config_file,
+ file { "${dns::keyconf_dir}/${keyname}.conf":
+ ensure => $ensure,
content => epp("${module_name}/key.epp", {
keyname => $keyname,
algorithm => $algorithm,