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',
|
$knotrestversion = '0.0.2-1~ubuntu22.04',
|
||||||
){
|
){
|
||||||
|
|
||||||
|
$knot_rest_token_secret = lookup({ 'name' => 'knot_rest_token_secret', 'default_value' => undef })
|
||||||
|
|
||||||
# Stop & disable systemd-resloved
|
# Stop & disable systemd-resloved
|
||||||
service { "systemd-resolved":
|
service { "systemd-resolved":
|
||||||
ensure => 'stopped',
|
ensure => 'stopped',
|
||||||
|
@ -60,15 +62,16 @@ class dns::knotdns(
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install KnotREST configuration
|
# Install KnotREST configuration
|
||||||
|
if $knot_rest_token_secret {
|
||||||
file { "/etc/knot_rest/knot_rest.yaml":
|
file { "/etc/knot_rest/knot_rest.yaml":
|
||||||
ensure => "file",
|
ensure => "file",
|
||||||
content => template("dns/knot/knot_rest.yaml.erb")
|
content => template("dns/knot/knot_rest.yaml.erb")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
file{"/var/log/knot_rest":
|
file{"/var/log/knot_rest":
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => '0750',
|
mode => '0750',
|
||||||
owner => 'knot_rest',
|
owner => 'knot_rest',
|
||||||
group => 'knot_rest',
|
group => 'knot_rest',
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue