Compare commits
No commits in common. "31d7a3c93a3555f9ea8aea7720dd0532069bd112" and "88e3771f6e75e5fbf5a4a445110799537b082936" have entirely different histories.
31d7a3c93a
...
88e3771f6e
|
@ -31,7 +31,7 @@ class cdn::cache(
|
|||
mode => '0755',
|
||||
}
|
||||
|
||||
file { '/opt/sunet-cdn/conf/varnish-slash-seccomp.json':
|
||||
file { "/opt/sunet-cdn/conf/varnish-slash-seccomp.json":
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
|
@ -42,63 +42,63 @@ class cdn::cache(
|
|||
if $cache_secrets {
|
||||
$customers.each |String $customer, Integer $customer_uid| {
|
||||
if $cache_secrets['customers'][$customer] {
|
||||
file { "/opt/sunet-cdn/customers/${customer}":
|
||||
file { "/opt/sunet-cdn/customers/$customer":
|
||||
ensure => directory,
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
mode => '0750',
|
||||
}
|
||||
|
||||
file { "/opt/sunet-cdn/customers/${customer}/conf":
|
||||
file { "/opt/sunet-cdn/customers/$customer/conf":
|
||||
ensure => directory,
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
mode => '0750',
|
||||
}
|
||||
|
||||
file { "/opt/sunet-cdn/customers/${customer}/shared":
|
||||
file { "/opt/sunet-cdn/customers/$customer/shared":
|
||||
ensure => directory,
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
mode => '0750',
|
||||
}
|
||||
|
||||
file { "/opt/sunet-cdn/customers/${customer}/cache":
|
||||
file { "/opt/sunet-cdn/customers/$customer/cache":
|
||||
ensure => directory,
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
mode => '0750',
|
||||
}
|
||||
|
||||
file { "/opt/sunet-cdn/customers/${customer}/certs-private":
|
||||
file { "/opt/sunet-cdn/customers/$customer/certs-private":
|
||||
ensure => directory,
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
mode => '0750',
|
||||
}
|
||||
|
||||
$combined_pem = "/opt/sunet-cdn/customers/${customer}/certs-private/combined.pem"
|
||||
$combined_pem = "/opt/sunet-cdn/customers/$customer/certs-private/combined.pem"
|
||||
|
||||
concat { $combined_pem:
|
||||
ensure => present,
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
mode => '0640',
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
mode => '0640'.
|
||||
}
|
||||
|
||||
concat::fragment { "${customer}.fullchain-${$cache_secrets['customers'][$customer]['host']}":
|
||||
target => $combined_pem,
|
||||
source => "/etc/letsencrypt/live/${cache_secrets['customers'][${customer}]['host']}/fullchain.pem",
|
||||
order => '01'
|
||||
concat::fragment { "$customer-fullchain-${$cache_secrets['customers'][$customer]['host']}":
|
||||
target => $combined_pem,
|
||||
source => "/etc/letsencrypt/live/$cache_secrets['customers'][$customer]['host']/fullchain.pem",
|
||||
order => '01'
|
||||
}
|
||||
|
||||
concat::fragment { "${customer}-privkey-${$cache_secrets['customers'][$customer]['host']}":
|
||||
target => $combined_pem,
|
||||
source => "/etc/letsencrypt/live/${cache_secrets['customers'][${customer}]['host']}/privkey.pem",
|
||||
order => '02'
|
||||
concat::fragment { "$customer-privkey-${$cache_secrets['customers'][$customer]['host']}":
|
||||
target => $combined_pem,
|
||||
source => "/etc/letsencrypt/live/$cache_secrets['customers'][$customer]['host']/privkey.pem",
|
||||
order => '02'
|
||||
}
|
||||
|
||||
file { "/opt/sunet-cdn/customers/${customer}/conf/haproxy.cfg":
|
||||
file { "/opt/sunet-cdn/customers/$customer/conf/haproxy.cfg":
|
||||
ensure => file,
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
|
@ -106,7 +106,7 @@ class cdn::cache(
|
|||
content => template('cdn/cache/haproxy.cfg.erb'),
|
||||
}
|
||||
|
||||
file { "/opt/sunet-cdn/customers/${customer}/conf/varnish.vcl":
|
||||
file { "/opt/sunet-cdn/customers/$customer/conf/varnish.vcl":
|
||||
ensure => file,
|
||||
owner => $customer_uid,
|
||||
group => $customer_uid,
|
||||
|
@ -114,12 +114,12 @@ class cdn::cache(
|
|||
content => template('cdn/cache/varnish.vcl.erb'),
|
||||
}
|
||||
|
||||
sunet::docker_compose { "sunet-cdn-cache-${customer}":
|
||||
sunet::docker_compose { "sunet-cdn-cache-$customer":
|
||||
content => template('cdn/cache/docker-compose.yml.erb'),
|
||||
service_name => "cdn-cache-${customer}",
|
||||
compose_dir => "/opt/sunet-cdn/compose/${customer}",
|
||||
service_name => "cdn-cache-$customer",
|
||||
compose_dir => "/opt/sunet-cdn/compose/$customer",
|
||||
compose_filename => 'docker-compose.yml',
|
||||
description => "SUNET CDN CA ${customer}",
|
||||
description => "SUNET CDN CA $customer",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue