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