--- - name: "Setup DNS configuration for <{{ connect_id }}> to <{{ stage_server_ip }}>" include_role: name: dns vars: record_data: "{{ stage_server_ip }}" record_name: "{{ connect_id }}" - name: "Setup DNS configuration for <{{ connect_external_domain }}> to <{{ stage_server_ip }}>" include_role: name: dns vars: record_data: "{{ stage_server_ip }}" record_name: "{{ connect_external_domain }}" when: connect_external_domain is defined - name: "Check if {{ connect_id }}/docker-compose.yml exists" stat: path: '{{ service_base_path }}/{{ connect_id }}/docker-compose.yml' register: check_docker_compose_file_connect - name: "Stop {{ connect_id }}" community.docker.docker_compose: project_src: '{{ service_base_path }}/{{ connect_id }}' state: absent when: check_docker_compose_file_connect.stat.exists - name: "Deploy docker templates for {{ connect_id }}" include_role: name: sma_deploy tasks_from: templates vars: current_config: "connect-compact" current_base_path: "{{ service_base_path }}" current_destination: "{{ connect_id }}" current_owner: "{{ docker_owner }}" current_group: "{{ docker_group }}" - name: "Restart {{ connect_id }}" community.docker.docker_compose: project_src: '{{ service_base_path }}/{{ connect_id }}' restarted: yes build: no