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
pull/20/head
exploide 8 years ago
parent 3dedd45961
commit 35ceee9f1b
  1. 13
      tasks/install-from-git.yml
  2. 21
      tasks/main.yml
  3. 8
      tasks/renew-cron.yml

@ -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.
git:
repo: "{{ certbot_repo }}"
dest: "{{ certbot_dir }}"
version: "{{ certbot_version }}"
update: "{{ certbot_keep_updated }}"
force: yes
- include: install-from-git.yml
- name: Ensure certbot-auto is executable.
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 }}"
- include: renew-cron.yml
when: certbot_auto_renew

@ -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…
Cancel
Save