xoxys.certbot/tasks/setup.yml

21 lines
635 B
YAML

---
- 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 }}
--max-log-backups {{ certbot_max_log_backups }}
--agree-tos
{{ certbot_command_arguments | join(' ') }}
-n -d {{ item.domains | join(',') }}
register: __certbot_init
changed_when: __certbot_init.rc == 130
ignore_errors: True
loop: "{{ certbot_domain_groups }}"
loop_control:
label: "{{ item.name }}"
when: item.init | default(False) | bool
become: True
become_user: "{{ certbot_user }}"