677bc50519
* Moved deployment/molecule to deployment-e2e * Update paths and readmes * Nested molecule * Corrected paths * paths * path * Moved docker up
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
- name: Overwrite UI the docker-compose
|
|
hosts: ui
|
|
become: true
|
|
tasks:
|
|
- name: stop the service
|
|
shell: service tokenbridge-ui stop
|
|
|
|
- name: Slurp docker compose file
|
|
slurp:
|
|
src: "/home/poadocker/bridge/ui/docker-compose.yml"
|
|
register: docker_compose_slurp
|
|
- name: Parse docker compose file
|
|
set_fact:
|
|
docker_compose_parsed: "{{ docker_compose_slurp['content'] | b64decode | from_yaml }}"
|
|
|
|
- name: Add the external network used to connect to Parity nodes
|
|
set_fact:
|
|
docker_compose_parsed: "{{ docker_compose_parsed |combine({'networks': {'ultimate': {'external': 'true'}}}, recursive=True) }}"
|
|
|
|
- name: Add all UI containers to the network
|
|
set_fact:
|
|
docker_compose_parsed: "{{ docker_compose_parsed | combine({'services': {item: {'networks': ['ultimate']}}}, recursive=True) }}"
|
|
with_items: "{{ docker_compose_parsed.services }}"
|
|
|
|
- name: Write new docker-compose file
|
|
copy:
|
|
content: "{{ docker_compose_parsed | to_yaml }}"
|
|
dest: "/home/poadocker/bridge/ui/docker-compose.yml"
|
|
|
|
- name: start the service
|
|
shell: service tokenbridge-ui start
|