fix(ansible): Fix YAML syntax in traefik/tasks/ssl.yml
- Change when clause from list to string format to fix YAML parsing error - Use 'and' operators instead of list items for better readability
This commit is contained in:
@@ -40,19 +40,19 @@
|
||||
cd {{ traefik_stack_path }}
|
||||
docker compose restart {{ traefik_container_name }}
|
||||
changed_when: true
|
||||
when:
|
||||
- (traefik_ssl_restart | default(false) | bool) or (acme_stat.changed | default(false) | bool)
|
||||
- traefik_status.rc == 0
|
||||
- "Up" in traefik_status.stdout
|
||||
when: >
|
||||
((traefik_ssl_restart | default(false) | bool) or (acme_stat.changed | default(false) | bool))
|
||||
and traefik_status.rc == 0
|
||||
and "Up" in traefik_status.stdout
|
||||
|
||||
- name: Wait for Traefik to be ready (after restart)
|
||||
ansible.builtin.wait_for:
|
||||
timeout: "{{ traefik_ssl_wait_timeout | default(10) }}"
|
||||
changed_when: false
|
||||
when:
|
||||
- (traefik_ssl_restart | default(false) | bool) or (acme_stat.changed | default(false) | bool)
|
||||
- traefik_status.rc == 0
|
||||
- "Up" in traefik_status.stdout
|
||||
when: >
|
||||
((traefik_ssl_restart | default(false) | bool) or (acme_stat.changed | default(false) | bool))
|
||||
and traefik_status.rc == 0
|
||||
and "Up" in traefik_status.stdout
|
||||
|
||||
- name: Trigger certificate request by accessing each domain
|
||||
ansible.builtin.uri:
|
||||
|
||||
Reference in New Issue
Block a user