ansible-role-dehydrated/tasks/dehydrated.yml
2023-04-11 21:38:48 +02:00

24 lines
732 B
YAML

---
- name: "Dehydrated | Accept TOS"
ansible.builtin.command: dehydrated --register --accept-terms
# https://github.com/dehydrated-io/dehydrated/blob/master/docs/domains_txt.md
- name: "Dehydrated | Create domains.txt"
ansible.builtin.file:
path: /etc/dehydrated/domains.txt
state: touch
mode: "0644"
- name: "Dehydrated | Create domains directory"
ansible.builtin.file:
path: /etc/dehydrated/domains.txt.d
state: directory
mode: "0755"
- name: Dehydrated | Create cron job
ansible.builtin.cron:
name: "{{ dehydrated_cron_name }}"
hour: "{{ dehydrated_cron_hour }}"
minute: "{{ dehydrated_cron_minute }}"
user: "{{ dehydrated_cron_user }}"
job: "chronic dehydrated --cron -g"