aboutsummaryrefslogtreecommitdiff
path: root/personal_infra/puppet/modules/proxmox/manifests/proxy.pp
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2023-06-03 18:38:07 +0200
committeralex <alex@pdp7.net>2023-06-03 18:38:07 +0200
commitfeb7806c176cb39be01d9a1473ea2957204dad99 (patch)
treeaeebaeba2f7ceffc5c867777c1bdd98aa468cd98 /personal_infra/puppet/modules/proxmox/manifests/proxy.pp
parentd7b2b8287ab8cdbc6c0d301543f4b0d6b56a02e7 (diff)
Improve proxmox proxy handling
* Just set proxmox certs instead of notifying and using a cron * Add hosts to copy certs to inside hosts
Diffstat (limited to 'personal_infra/puppet/modules/proxmox/manifests/proxy.pp')
-rw-r--r--personal_infra/puppet/modules/proxmox/manifests/proxy.pp15
1 files changed, 6 insertions, 9 deletions
diff --git a/personal_infra/puppet/modules/proxmox/manifests/proxy.pp b/personal_infra/puppet/modules/proxmox/manifests/proxy.pp
index b8c1b9de..cb3c0bd4 100644
--- a/personal_infra/puppet/modules/proxmox/manifests/proxy.pp
+++ b/personal_infra/puppet/modules/proxmox/manifests/proxy.pp
@@ -39,17 +39,14 @@ class proxmox::proxy ($mail, $base_hostname) {
content => @("EOT"/$)
#!/bin/sh
- mail $mail -s "Restart apache2 on $base_hostname for certificate \$1" </dev/null
+ systemctl restart apache2
+ pvenode cert set /etc/apache2/md/domains/$base_hostname/pubcert.pem /etc/apache2/md/domains/$base_hostname/privkey.pem --force 1 --restart 1
+
+ for hook in /usr/local/bin/notify_md_renewal_hook_* ; do
+ \$hook
+ done
| EOT
,
mode => '0755',
}
-
- package {'cronic':}
-
- cron {'pve-certs':
- command => "/usr/bin/cronic /usr/bin/pvenode cert set /etc/apache2/md/domains/$base_hostname/pubcert.pem /etc/apache2/md/domains/$base_hostname/privkey.pem --force 1 --restart 1",
- user => 'root',
- special => 'daily',
- }
}