# run_once_srv_proxy_6_6_domain: deactivated - name: "include role for {{domain}} to receive certificates and do the modification routines" include_role: name: srv-web-7-6-composer - name: "Copy nginx config to {{ configuration_destination }}" template: src: "{{ vhost_template_src }}" dest: "{{ configuration_destination }}" register: nginx_conf notify: restart nginx - 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 - name: Restart nginx if site is down command: cmd: "true" notify: restart nginx when: - not nginx_conf.changed - site_check.status is defined - not site_check.status in [200,301,302]