diff --git a/roles/srv-proxy-6-6-domain/tasks/main.yml b/roles/srv-proxy-6-6-domain/tasks/main.yml index 12bb84d3..878d450d 100644 --- a/roles/srv-proxy-6-6-domain/tasks/main.yml +++ b/roles/srv-proxy-6-6-domain/tasks/main.yml @@ -1,7 +1,6 @@ # run_once_srv_proxy_6_6_domain: deactivated -- block: - - include_tasks: "01_cloudflare.yml" +- include_tasks: "01_cloudflare.yml" when: dns_provider == "cloudflare" - include_tasks: "{{ playbook_dir }}/tasks/utils/load_handlers.yml" @@ -19,19 +18,19 @@ register: nginx_conf notify: restart openresty -- name: "Check if {{ domains | get_domain(application_id) }} is reachable (only if config unchanged)" - uri: - url: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}" - register: site_check - failed_when: false - changed_when: false - when: not nginx_conf.changed +- block: + - name: "Check if {{ domains | get_domain(application_id) }} is reachable (only if config unchanged)" + uri: + url: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}" + register: site_check + failed_when: false + changed_when: false -- name: Restart nginx if site is down - command: - cmd: "true" - notify: restart openresty - when: - - not nginx_conf.changed - - site_check.status is defined - - not site_check.status in [200,301,302] \ No newline at end of file + - name: Restart nginx if site is down + command: + cmd: "true" + notify: restart openresty + when: + - site_check.status is defined + - not site_check.status in [200,301,302] + when: not nginx_conf.changed \ No newline at end of file