Don't add docker network if it exists

This commit is contained in:
Johan Björklund 2024-11-20 13:17:13 +01:00
parent 8ed157c256
commit 215883d881
Signed by untrusted user: bjorklund
GPG key ID: 5E8401339C7F5037

View file

@ -43,7 +43,7 @@ class soc::sso(
Boolean $satosa_certbot = false, Boolean $satosa_certbot = false,
String $translog = 'INFO', String $translog = 'INFO',
String $proxy = 'https://shared-sso-proxy1.cert.sunet.se/idp', String $proxy = 'https://shared-sso-proxy1.cert.sunet.se/idp',
Strnng $entityID = $proxy, String $entityID = $proxy,
) { ) {
if $ssotype == "docker" { if $ssotype == "docker" {
@ -189,6 +189,7 @@ class soc::sso(
# specify this subnet as source of trusted proxies. This is used in Graylog, # specify this subnet as source of trusted proxies. This is used in Graylog,
# for example; see setting "trusted_proxies". # for example; see setting "trusted_proxies".
command => 'docker network create sso --subnet 172.29.0.0/24 || true' command => 'docker network create sso --subnet 172.29.0.0/24 || true'
unless => 'docker network ls | grep -q sso 2>&1'
} }
file { '/opt/sso/docker-compose.yml': file { '/opt/sso/docker-compose.yml':