mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
initial cleanup server-manager
This commit is contained in:
4
roles/native-certbot-nginx/handlers/main.yml
Normal file
4
roles/native-certbot-nginx/handlers/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: restart certbot service
|
||||
service: name=certbot.service state=restarted enabled=yes
|
||||
- name: restart certbot timer
|
||||
service: name=certbot.timer state=restarted enabled=yes
|
2
roles/native-certbot-nginx/meta/main.yml
Normal file
2
roles/native-certbot-nginx/meta/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- native-nginx
|
13
roles/native-certbot-nginx/tasks/main.yml
Normal file
13
roles/native-certbot-nginx/tasks/main.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
- name: install certbot
|
||||
pacman:
|
||||
name: [certbot,certbot-nginx]
|
||||
state: present
|
||||
notify: restart certbot service
|
||||
|
||||
- name: configure certbot.service.tpl
|
||||
template: src=certbot.service dest=/etc/systemd/system/certbot.service
|
||||
notify: restart certbot service
|
||||
|
||||
- name: configure certbot.timer.tpl
|
||||
template: src=certbot.timer dest=/etc/systemd/system/certbot.timer
|
||||
notify: restart certbot timer
|
7
roles/native-certbot-nginx/templates/certbot.service
Normal file
7
roles/native-certbot-nginx/templates/certbot.service
Normal file
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Let's Encrypt renewal
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/certbot renew --quiet --agree-tos
|
||||
ExecStartPost=/bin/systemctl reload nginx.service
|
10
roles/native-certbot-nginx/templates/certbot.timer
Normal file
10
roles/native-certbot-nginx/templates/certbot.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Twice daily renewal of Let's Encrypt's certificates
|
||||
|
||||
[Timer]
|
||||
OnCalendar=0/12:00:00
|
||||
RandomizedDelaySec=1h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Reference in New Issue
Block a user