diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-10-14 06:40:15 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-10-14 06:41:26 -0400 |
commit | 66dabb4ea24b6f71128c1410040c06ea90094a2a (patch) | |
tree | a3641a5224888a74664f77264a85e162ff4383df /modules/certbot | |
parent | 15e89564f96458b4b9123b69b1dcb7f2c8ed0efd (diff) | |
download | puppet-tozt-66dabb4ea24b6f71128c1410040c06ea90094a2a.tar.gz puppet-tozt-66dabb4ea24b6f71128c1410040c06ea90094a2a.zip |
point certbot at a different directory instead of using a symlink
can't make a symlink at a place that a package expects to create a real
directory
Diffstat (limited to 'modules/certbot')
-rw-r--r-- | modules/certbot/files/certbot | 3 | ||||
-rw-r--r-- | modules/certbot/manifests/init.pp | 13 | ||||
-rw-r--r-- | modules/certbot/templates/certbot | 3 |
3 files changed, 13 insertions, 6 deletions
diff --git a/modules/certbot/files/certbot b/modules/certbot/files/certbot deleted file mode 100644 index 3e42fdd..0000000 --- a/modules/certbot/files/certbot +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -certbot renew -q diff --git a/modules/certbot/manifests/init.pp b/modules/certbot/manifests/init.pp index b4fffab..c3f0c9e 100644 --- a/modules/certbot/manifests/init.pp +++ b/modules/certbot/manifests/init.pp @@ -1,4 +1,11 @@ -class certbot { +class certbot($config_dir=undef) { + if $config_dir { + $config_dir_opts = " --config-dir ${config_dir}" + } + else { + $config_dir_opts = "" + } + include cron include nginx @@ -12,7 +19,7 @@ class certbot { file { '/etc/cron.daily/certbot': - source => 'puppet:///modules/certbot/certbot', + content => template('certbot/certbot'), mode => '0755', require => [ Package['certbot'], @@ -31,7 +38,7 @@ class certbot { exec { "initial certbot run": # XXX update to real domain name - command => "/usr/bin/certbot -n --agree-tos -m doy@tozt.net --nginx -d new.tozt.net", + command => "/usr/bin/certbot -n --agree-tos -m doy@tozt.net --nginx -d new.tozt.net${config_dir_opts}", creates => "/etc/letsencrypt/live", require => [ Package["certbot"], diff --git a/modules/certbot/templates/certbot b/modules/certbot/templates/certbot new file mode 100644 index 0000000..9568fe1 --- /dev/null +++ b/modules/certbot/templates/certbot @@ -0,0 +1,3 @@ +#!/bin/sh + +certbot renew -q<%= @config_dir_opts %> |