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:
2025-11-08 23:28:49 +01:00
parent bb7cf35e54
commit a96bd41326

View File

@@ -40,19 +40,19 @@
cd {{ traefik_stack_path }} cd {{ traefik_stack_path }}
docker compose restart {{ traefik_container_name }} docker compose restart {{ traefik_container_name }}
changed_when: true changed_when: true
when: when: >
- (traefik_ssl_restart | default(false) | bool) or (acme_stat.changed | default(false) | bool) ((traefik_ssl_restart | default(false) | bool) or (acme_stat.changed | default(false) | bool))
- traefik_status.rc == 0 and traefik_status.rc == 0
- "Up" in traefik_status.stdout and "Up" in traefik_status.stdout
- name: Wait for Traefik to be ready (after restart) - name: Wait for Traefik to be ready (after restart)
ansible.builtin.wait_for: ansible.builtin.wait_for:
timeout: "{{ traefik_ssl_wait_timeout | default(10) }}" timeout: "{{ traefik_ssl_wait_timeout | default(10) }}"
changed_when: false changed_when: false
when: when: >
- (traefik_ssl_restart | default(false) | bool) or (acme_stat.changed | default(false) | bool) ((traefik_ssl_restart | default(false) | bool) or (acme_stat.changed | default(false) | bool))
- traefik_status.rc == 0 and traefik_status.rc == 0
- "Up" in traefik_status.stdout and "Up" in traefik_status.stdout
- name: Trigger certificate request by accessing each domain - name: Trigger certificate request by accessing each domain
ansible.builtin.uri: ansible.builtin.uri: