only generate host_credential and mirror cronjob if dest_host is set
This commit is contained in:
parent
e4d31f76a7
commit
322bf6b63f
1 changed files with 16 additions and 14 deletions
|
@ -129,7 +129,7 @@ class md_repo_client {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class md_signer($dest_host="localhost",$dest_dir="") {
|
class md_signer($dest_host=undef,$dest_dir="") {
|
||||||
sunet::snippets::secret_file {"/etc/credentials/metadata.key":
|
sunet::snippets::secret_file {"/etc/credentials/metadata.key":
|
||||||
hiera_key => 'eidas_metadata_key',
|
hiera_key => 'eidas_metadata_key',
|
||||||
base64 => true
|
base64 => true
|
||||||
|
@ -139,7 +139,8 @@ class md_signer($dest_host="localhost",$dest_dir="") {
|
||||||
pound_and_varnish => false,
|
pound_and_varnish => false,
|
||||||
pipeline => "${name}.fd",
|
pipeline => "${name}.fd",
|
||||||
volumes => ["/etc/credentials:/etc/credentials"]
|
volumes => ["/etc/credentials:/etc/credentials"]
|
||||||
} ->
|
}
|
||||||
|
if ($dest_host) {
|
||||||
sunet::ssh_host_credential { "${name}-publish-credential":
|
sunet::ssh_host_credential { "${name}-publish-credential":
|
||||||
hostname => $dest_host,
|
hostname => $dest_host,
|
||||||
username => 'root',
|
username => 'root',
|
||||||
|
@ -154,6 +155,7 @@ class md_signer($dest_host="localhost",$dest_dir="") {
|
||||||
warn_criteria => ['max_age=30m']
|
warn_criteria => ['max_age=30m']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class md_publisher(Array $allow_clients=['any'], $keyname=undef, String $dir="/var/www/html") {
|
class md_publisher(Array $allow_clients=['any'], $keyname=undef, String $dir="/var/www/html") {
|
||||||
$_keyname = $keyname ? {
|
$_keyname = $keyname ? {
|
||||||
|
|
Loading…
Add table
Reference in a new issue