From 7c761d9f025a0d2e0f8a35746ac2da51a3aea4ed Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Fri, 27 Oct 2017 16:22:09 +0200 Subject: [PATCH] move hostname and country parameters to hiera --- .../overlay/etc/hiera/data/local.yaml | 2 ++ .../overlay/etc/hiera/data/local.yaml | 3 +++ global/overlay/etc/puppet/cosmos-rules.yaml | 3 +-- global/overlay/etc/puppet/manifests/cosmos-site.pp | 7 +++++-- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 eidas-node-1.qa.sveidas.se/overlay/etc/hiera/data/local.yaml create mode 100644 eidas-proxy-1.qa.sveidas.se/overlay/etc/hiera/data/local.yaml diff --git a/eidas-node-1.qa.sveidas.se/overlay/etc/hiera/data/local.yaml b/eidas-node-1.qa.sveidas.se/overlay/etc/hiera/data/local.yaml new file mode 100644 index 00000000..cfffe1a7 --- /dev/null +++ b/eidas-node-1.qa.sveidas.se/overlay/etc/hiera/data/local.yaml @@ -0,0 +1,2 @@ +--- +eidas_connector_hostname=eunode.qa.sveidas.se diff --git a/eidas-proxy-1.qa.sveidas.se/overlay/etc/hiera/data/local.yaml b/eidas-proxy-1.qa.sveidas.se/overlay/etc/hiera/data/local.yaml new file mode 100644 index 00000000..c3608071 --- /dev/null +++ b/eidas-proxy-1.qa.sveidas.se/overlay/etc/hiera/data/local.yaml @@ -0,0 +1,3 @@ +--- +eidas_proxy_hostname=xy.proxy.qa.sveidas.se +eidas_proxy_country=xy diff --git a/global/overlay/etc/puppet/cosmos-rules.yaml b/global/overlay/etc/puppet/cosmos-rules.yaml index 2fd236c5..5b9fe58b 100644 --- a/global/overlay/etc/puppet/cosmos-rules.yaml +++ b/global/overlay/etc/puppet/cosmos-rules.yaml @@ -20,11 +20,10 @@ r1.komreg.net: openstack_ubuntu_16_04_dockerhost: sunet_iaas_cloud: autoupdate: + eidas_connector: '^eidas-proxy-[0-9]+\.qa\.sveidas\.se$': openstack_ubuntu_16_04_dockerhost: sunet_iaas_cloud: autoupdate: eidas_proxy: - hostname: xy.qa.sveidas.se - country: xy diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp index abd087e7..d015adbf 100644 --- a/global/overlay/etc/puppet/manifests/cosmos-site.pp +++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp @@ -197,7 +197,8 @@ class swamid_pyff_signer { sunet::exabgp { 'swamid': } } -class eidas_connector($hostname) { +class eidas_connector { + $hostname = safe_hiera('eidas_connector_hostname') $idp_fticks_salt = safe_hiera('idp_fticks_salt',NOT_SET); file {['/etc/eidas-connector','/var/log/eidas-connector']: ensure => directory } -> sunet::docker_run {'eidas_connector': @@ -212,7 +213,9 @@ class eidas_connector($hostname) { class {'https_server': } } -class eidas_proxy($hostname,$country) { +class eidas_proxy { + $hostname = safe_hiera('eidas_proxy_hostname'); + $country = safe_hiera('eidas_proxy_country'); $proxy_service_cookie_encrypt_pw = safe_hiera('proxy_service_cookie_encrypt_pw',NOT_SET); file {['/etc/eidas-proxy/',"/etc/eidas-proxy/$country"]: ensure => directory } -> sunet::snippets::secret_file {"/etc/eidas-proxy/$country/nodeKeyStore.jks":