From 395e67c9186a68799fe7cc3c85e9e1b774dfeee5 Mon Sep 17 00:00:00 2001 From: Patrik Lundin Date: Thu, 31 Oct 2024 12:55:07 +0100 Subject: [PATCH] Download CDN purger to cache --- global/overlay/etc/puppet/modules/cdn/manifests/cache.pp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/global/overlay/etc/puppet/modules/cdn/manifests/cache.pp b/global/overlay/etc/puppet/modules/cdn/manifests/cache.pp index 0fe3684..fbd4855 100644 --- a/global/overlay/etc/puppet/modules/cdn/manifests/cache.pp +++ b/global/overlay/etc/puppet/modules/cdn/manifests/cache.pp @@ -3,6 +3,7 @@ class cdn::cache( Hash[String, Integer] $customers = { customer1 => 1000000000, } + String $sunet_cdnp_version = '0.0.1' ) { include sunet::packages::certbot @@ -126,6 +127,12 @@ class cdn::cache( rule => 'add rule inet filter input meta iifname ip6tnl0 ip6 daddr 2001:6b0:2100::/48 tcp dport { 80, 443 } counter accept comment "sunet-cdn-service6"' } + # Download CDN purger + exec { "curl -LO https://github.com/SUNET/sunet-cdnp/releases/download/v${sunet_cdnp_version}/sunet-cdnp_${sunet_cdnp_version}_linux_${facts[os][architecture]}.tar.gz": + creates => "/root/sunet-cdnp_${sunet_cdnp_version}_linux_${facts[os][architecture]}.tar.gz", + cwd => '/root' + } + if $cache_secrets { $customers.each |String $customer, Integer $customer_uid| { if $cache_secrets['customers'][$customer] {