aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/manifests
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-13 13:23:17 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-13 22:51:36 +0100
commit0a21fb6c2c52ca5cc2dfdfc41ca0a51c0d81296c (patch)
tree95af1b06a4b8d67759628071f163b3d42c9c7f22 /modules/profile/manifests
parent96d61e22a20255c2b437eb3a3b81f9b44a1814de (diff)
downloadPuppet-0a21fb6c2c52ca5cc2dfdfc41ca0a51c0d81296c.tar.gz
Puppet-0a21fb6c2c52ca5cc2dfdfc41ca0a51c0d81296c.tar.zst
Puppet-0a21fb6c2c52ca5cc2dfdfc41ca0a51c0d81296c.zip
Start to cleanup the files
Diffstat (limited to 'modules/profile/manifests')
-rw-r--r--modules/profile/manifests/apache.pp15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/profile/manifests/apache.pp b/modules/profile/manifests/apache.pp
index 8db58da..382633b 100644
--- a/modules/profile/manifests/apache.pp
+++ b/modules/profile/manifests/apache.pp
@@ -67,13 +67,12 @@ class profile::apache {
67 install_method => "package", 67 install_method => "package",
68 package_name => "certbot", 68 package_name => "certbot",
69 package_command => "certbot", 69 package_command => "certbot",
70 # FIXME 70 email => lookup('letsencrypt::email'),
71 email => 'sites+letsencrypt@mail.immae.eu',
72 } 71 }
73 72
74 $real_hostname = lookup("base_installation::real_hostname") |$key| { {} } 73 $real_hostname = lookup("base_installation::real_hostname", { "default_value" => undef })
75 unless empty($real_hostname) { 74 unless empty($real_hostname) {
76 if (lookup("ssl::try_letsencrypt_for_real_hostname") |$key| { true }) { 75 if (lookup("letsencrypt::try_for_real_hostname", { "default_value" => true })) {
77 letsencrypt::certonly { $real_hostname: 76 letsencrypt::certonly { $real_hostname:
78 before => Apache::Vhost["default_ssl"]; 77 before => Apache::Vhost["default_ssl"];
79 default: * => $::profile::apache::letsencrypt_certonly_default; 78 default: * => $::profile::apache::letsencrypt_certonly_default;
@@ -110,6 +109,14 @@ class profile::apache {
110 } 109 }
111 } 110 }
112 111
112 lookup("letsencrypt::hosts", { "default_value" => [] }).each |$host| {
113 if ($host != $real_hostname) { # Done above already
114 letsencrypt::certonly { $host: ;
115 default: * => $letsencrypt_certonly_default;
116 }
117 }
118 }
119
113 apache::vhost { "redirect_no_ssl": 120 apache::vhost { "redirect_no_ssl":
114 port => '80', 121 port => '80',
115 error_log => false, 122 error_log => false,