eid-ops/global/overlay/etc/puppet/modules/eid/manifests/idm_app.pp

27 lines
1 KiB
ObjectPascal
Raw Normal View History

2024-02-26 10:47:19 +01:00
# idm_app
class eid::idm_app (
) {
2024-02-26 11:26:43 +01:00
2024-02-26 11:38:55 +01:00
$redises = lookup('redis_cluster_nodes', undef, undef, [])
2024-02-26 11:26:43 +01:00
ensure_resource('sunet::misc::create_dir', '/opt/idm_app/config/', { owner => 'root', group => 'root', mode => '0750'})
file { '/opt/idm_app/config/idm.yml':
content => template('eid/idm/idm.yml.erb'),
mode => '0755',
2024-02-26 11:28:06 +01:00
}
2024-02-26 14:04:31 +01:00
# Unwanted password - but hey Java!
$pass = 'qwerty123'
exec { "${facts['networking']['fqdn']}_infra.p12":
command => "openssl pkcs12 -export -in /etc/ssl/certs/${facts['networking']['fqdn']}_infra.crt -inkey /etc/ssl/private/${facts['networking']['fqdn']}_infra.pem -name 'infra' -out /etc/ssl/private/${facts['networking']['fqdn']}_infra.p12 -passout pass:${pass}",
onlyif => "test ! -f /etc/ssl/private/${facts['networking']['fqdn']}_infra.p12"
}
2024-02-26 10:47:19 +01:00
sunet::docker_compose { 'idm_app':
content => template('eid/idm/docker-compose.yml.erb'),
service_name => 'idm_app',
2024-02-26 11:00:53 +01:00
compose_dir => '/opt/',
2024-02-26 10:47:19 +01:00
compose_filename => 'docker-compose.yml',
description => 'Identity matching'
}
}