summaryrefslogtreecommitdiffstats
path: root/modules/certbot
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-07-11 01:55:11 -0400
committerJesse Luehrs <doy@tozt.net>2020-07-11 01:55:11 -0400
commit064fe099898269ee232edf7bb9803c86389b8980 (patch)
tree03c4f6bc0cd11bcf1d1f53486c4a126fa81a995c /modules/certbot
parent46259587634a5c95136594e5066372541259e56b (diff)
downloadpuppet-tozt-064fe099898269ee232edf7bb9803c86389b8980.tar.gz
puppet-tozt-064fe099898269ee232edf7bb9803c86389b8980.zip
factor cron jobs out into a helper module
Diffstat (limited to 'modules/certbot')
-rw-r--r--modules/certbot/manifests/init.pp14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/certbot/manifests/init.pp b/modules/certbot/manifests/init.pp
index 8f3b4cb..200b854 100644
--- a/modules/certbot/manifests/init.pp
+++ b/modules/certbot/manifests/init.pp
@@ -6,7 +6,6 @@ class certbot($config_dir=undef) {
$_config_dir = "/etc/letsencrypt"
}
- include cron
include nginx
$primary_domain = "tozt.net"
@@ -31,13 +30,6 @@ class certbot($config_dir=undef) {
}
file {
- '/etc/cron.daily/certbot':
- content => template('certbot/certbot'),
- mode => '0755',
- require => [
- Package['certbot'],
- Class['cron'],
- ];
"${_config_dir}/renewal-hooks":
ensure => directory,
require => Package['certbot'];
@@ -59,6 +51,12 @@ class certbot($config_dir=undef) {
mode => '0755';
}
+ cron::job { "certbot":
+ frequency => "daily",
+ content => template('certbot/certbot'),
+ require => Package['certbot'];
+ }
+
exec { "initial certbot run":
provider => shell,
command => "/usr/local/bin/certbot-tozt ${config_dir}",