Create knot_rest_token_secret variable from secret
This commit is contained in:
parent
a54c86b584
commit
27289f0be5
|
@ -4,6 +4,8 @@ class dns::knotdns(
|
|||
$knotrestversion = '0.0.2-1~ubuntu22.04',
|
||||
){
|
||||
|
||||
$knot_rest_token_secret = lookup({ 'name' => 'knot_rest_token_secret', 'default_value' => undef })
|
||||
|
||||
# Stop & disable systemd-resloved
|
||||
service { "systemd-resolved":
|
||||
ensure => 'stopped',
|
||||
|
@ -60,9 +62,11 @@ class dns::knotdns(
|
|||
}
|
||||
|
||||
# Install KnotREST configuration
|
||||
file { "/etc/knot_rest/knot_rest.yaml":
|
||||
ensure => "file",
|
||||
content => template("dns/knot/knot_rest.yaml.erb")
|
||||
if $knot_rest_token_secret {
|
||||
file { "/etc/knot_rest/knot_rest.yaml":
|
||||
ensure => "file",
|
||||
content => template("dns/knot/knot_rest.yaml.erb")
|
||||
}
|
||||
}
|
||||
file{"/var/log/knot_rest":
|
||||
ensure => directory,
|
||||
|
@ -70,5 +74,4 @@ class dns::knotdns(
|
|||
owner => 'knot_rest',
|
||||
group => 'knot_rest',
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue