Skip to content
Snippets Groups Projects
Commit 7795ccc8 authored by Joakim Olovsson's avatar Joakim Olovsson
Browse files

Merge branch 'devel' into 'test'

Devel

See merge request liu-puppet-modules/ai4ca!3
parents 77b2f608 3ab00bd5
No related branches found
No related tags found
3 merge requests!7Test,!5Test,!3Devel
Pipeline #75111 passed
class ai4ca {
class ai4ca (
String $www_root = '/usr/share/nginx/html',
Array[String] $index_files = ['index.html'],
) {
include profiles::letsencrypt
include nginx
nginx::resource::server { fact('networking.fqdn'):
ensure => present,
www_root => $www_root,
location_cfg_append => {
'rewrite' => '^ https://$server_name$request_uri? permanent',
},
}
nginx::resource::server { "${fact('networking.fqdn')} HTTPS":
ensure => present,
listen_port => 443,
www_root => $www_root,
index_files => $index_files,
ssl => true,
ssl_cert => fact("letsencrypt_certs.${fact('networking.fqdn')}.files.combined"),
ssl_key => fact("letsencrypt_certs.${fact('networking.fqdn')}.files.key"),
}
firewalld_service {
'nginx http LiU':
zone => 'liu',
service => 'http';
'nginx https LiU':
zone => 'liu',
service => 'https';
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment