mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
restructured tasks such that subtask files are included
this is a preparation for installing certbot from package management additionally, it might be useful when further tasks are added, e.g. for initial certificate retrieval
This commit is contained in:
parent
3dedd45961
commit
35ceee9f1b
13
tasks/install-from-git.yml
Normal file
13
tasks/install-from-git.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- name: Clone Certbot into configured directory.
|
||||||
|
git:
|
||||||
|
repo: "{{ certbot_repo }}"
|
||||||
|
dest: "{{ certbot_dir }}"
|
||||||
|
version: "{{ certbot_version }}"
|
||||||
|
update: "{{ certbot_keep_updated }}"
|
||||||
|
force: yes
|
||||||
|
|
||||||
|
- name: Ensure certbot-auto is executable.
|
||||||
|
file:
|
||||||
|
path: "{{ certbot_dir }}/certbot-auto"
|
||||||
|
mode: 0755
|
@ -1,22 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Clone Certbot into configured directory.
|
- include: install-from-git.yml
|
||||||
git:
|
|
||||||
repo: "{{ certbot_repo }}"
|
|
||||||
dest: "{{ certbot_dir }}"
|
|
||||||
version: "{{ certbot_version }}"
|
|
||||||
update: "{{ certbot_keep_updated }}"
|
|
||||||
force: yes
|
|
||||||
|
|
||||||
- name: Ensure certbot-auto is executable.
|
- include: renew-cron.yml
|
||||||
file:
|
|
||||||
path: "{{ certbot_dir }}/certbot-auto"
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: Add cron job for 'certbot-auto renew' (if configured).
|
|
||||||
cron:
|
|
||||||
name: Certbot automatic renewal.
|
|
||||||
job: "{{ certbot_dir }}/certbot-auto renew --quiet --no-self-upgrade"
|
|
||||||
minute: "{{ certbot_auto_renew_minute }}"
|
|
||||||
hour: "{{ certbot_auto_renew_hour }}"
|
|
||||||
user: "{{ certbot_auto_renew_user }}"
|
|
||||||
when: certbot_auto_renew
|
when: certbot_auto_renew
|
||||||
|
8
tasks/renew-cron.yml
Normal file
8
tasks/renew-cron.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: Add cron job for 'certbot-auto renew' (if configured).
|
||||||
|
cron:
|
||||||
|
name: Certbot automatic renewal.
|
||||||
|
job: "{{ certbot_dir }}/certbot-auto renew --quiet --no-self-upgrade"
|
||||||
|
minute: "{{ certbot_auto_renew_minute }}"
|
||||||
|
hour: "{{ certbot_auto_renew_hour }}"
|
||||||
|
user: "{{ certbot_auto_renew_user }}"
|
Loading…
x
Reference in New Issue
Block a user