From 294ab5e36fb778d2d5d956370fe9fe925bcb5c54 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Sun, 11 Feb 2018 23:29:14 +0100 Subject: [PATCH] register in frontend --- global/overlay/etc/puppet/cosmos-rules.yaml | 7 +++++++ global/overlay/etc/puppet/manifests/cosmos-site.pp | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/global/overlay/etc/puppet/cosmos-rules.yaml b/global/overlay/etc/puppet/cosmos-rules.yaml index 3eb03cd4..7fe6d646 100644 --- a/global/overlay/etc/puppet/cosmos-rules.yaml +++ b/global/overlay/etc/puppet/cosmos-rules.yaml @@ -23,6 +23,13 @@ p1.komreg.net: sunet_iaas_cloud: autoupdate: md_publisher: + sunet::frontend::register_sites: + sites: + 'qa.komreg.se': + frontends: + - 'se-fre-lb-1.sunet.se' + - 'se-tug-lb-1.sunet.se' + port: '443' '^md[0-9]\.komreg\.net$': sunet_iaas_cloud: diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp index 46b81432..8f64c18b 100644 --- a/global/overlay/etc/puppet/manifests/cosmos-site.pp +++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp @@ -146,14 +146,15 @@ class md_signer($dest_host="localhost",$dest_dir="") { } } -class md_publisher(Array $allow_clients = [], String $dir = "/var/www/html") { +class md_publisher(Array $allow_clients = ['any'], String $dir = "/var/www/html") { sunet::rrsync {$dir: ro => false, ssh_key => safe_hiera('publisher_ssh_key',"NOT SET IN HIERA"), ssh_key_type => safe_hiera('publisher_ssh_key_type',"HOT SET IN HIERA") - } + } -> package {'lighttpd': ensure => latest } -> service {'lighttpd': ensure => running } -> + apparmor::profile { 'usr.sbin.lighttpd': source => '/etc/apparmor-cosmos/usr.sbin.lighttpd' } -> sunet::misc::ufw_allow {'allow-lighttpd': from => $allow_clients, port => 80