xoxys.certbot/tasks/setup.yml

21 lines
635 B
YAML
Raw Normal View History

2018-06-25 23:02:24 +02:00
---
2020-05-22 22:21:55 +02:00
- name: Initial run of certbot
command: >
{{ certbot_bin | default(__certbot_bin) }}
--config-dir {{ certbot_config_dir }}
--work-dir {{ certbot_work_dir }}
--logs-dir {{ certbot_log_dir }}
2021-06-04 08:45:03 +02:00
--max-log-backups {{ certbot_max_log_backups }}
2020-05-22 22:21:55 +02:00
--agree-tos
{{ certbot_command_arguments | join(' ') }}
2020-07-18 17:24:28 +02:00
-n -d {{ item.domains | join(',') }}
2020-11-23 21:44:46 +01:00
register: __certbot_init
changed_when: __certbot_init.rc == 130
2020-05-22 22:21:55 +02:00
ignore_errors: True
loop: "{{ certbot_domain_groups }}"
loop_control:
label: "{{ item.name }}"
when: item.init | default(False) | bool
2018-06-25 23:02:24 +02:00
become: True
become_user: "{{ certbot_user }}"