You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.3 KiB
YAML
88 lines
2.3 KiB
YAML
---
|
|
|
|
### tags:
|
|
### update_certs
|
|
### update_deployment
|
|
### update_connections
|
|
### update_configuration
|
|
|
|
- name: "Setup DNS configuration for <{{ connect_id }}> to <{{ stage_server_ip }}>"
|
|
include_role:
|
|
name: _digitalocean
|
|
tasks_from: domain
|
|
vars:
|
|
record_data: "{{ stage_server_ip }}"
|
|
record_name: "{{ connect_id }}"
|
|
|
|
- name: "Check if {{ connect_id }}/docker-compose.yml exists"
|
|
stat:
|
|
path: '{{ service_base_path }}/{{ connect_id }}/docker-compose.yml'
|
|
register: check_docker_compose_file
|
|
tags:
|
|
- update_deployment
|
|
|
|
- name: "Stop {{ connect_id }}"
|
|
shell: docker-compose down
|
|
args:
|
|
chdir: '{{ service_base_path }}/{{ connect_id }}'
|
|
when: check_docker_compose_file.stat.exists
|
|
ignore_errors: yes
|
|
tags:
|
|
- update_deployment
|
|
|
|
- name: "Deploy docker templates for {{ connect_id }}"
|
|
include_role:
|
|
name: _deploy
|
|
tasks_from: templates
|
|
vars:
|
|
current_config: "_docker"
|
|
current_base_path: "{{ service_base_path }}"
|
|
current_destination: "{{ connect_id }}"
|
|
current_owner: "{{ docker_owner }}"
|
|
current_group: "{{ docker_group }}"
|
|
current_docker: "{{ connect_docker }}"
|
|
|
|
- name: "Deploy service templates for {{ connect_id }}"
|
|
include_role:
|
|
name: _deploy
|
|
tasks_from: templates
|
|
vars:
|
|
current_config: "connect"
|
|
current_base_path: "{{ service_base_path }}"
|
|
current_destination: "{{ connect_id }}"
|
|
current_owner: "{{ docker_owner }}"
|
|
current_group: "{{ docker_group }}"
|
|
|
|
- name: "Deploy certificate templates for {{ connect_id }}"
|
|
include_role:
|
|
name: _deploy
|
|
tasks_from: templates
|
|
vars:
|
|
current_config: "elastic-certs/{{ stage}}-certs/ca"
|
|
current_base_path: "{{ service_base_path }}"
|
|
current_destination: "{{ connect_id }}/certs/ca"
|
|
current_owner: "{{ docker_owner }}"
|
|
current_group: "{{ docker_group }}"
|
|
cleanup_destination: "true"
|
|
tags:
|
|
- update_certs
|
|
|
|
- name: "Update {{ connect_id }}"
|
|
shell: docker-compose pull
|
|
args:
|
|
chdir: '{{ service_base_path }}/{{ connect_id }}'
|
|
tags:
|
|
- update_deployment
|
|
|
|
- name: "Start {{ connect_id }}"
|
|
shell: docker-compose up -d
|
|
args:
|
|
chdir: '{{ service_base_path }}/{{ connect_id }}'
|
|
tags:
|
|
- update_deployment
|
|
|
|
- name: "Configure connect connections"
|
|
include_tasks: connections.yml
|
|
tags:
|
|
- always
|