tokenbridge/deployment/molecule/ultimate-commons/oracle-docker-compose.yml
Przemyslaw Rzad 76daf5a436
Ultimate E2E for ERC TO NATIVE (#182)
* Introducing ultimate erc-to-native, with ultimate-commons

* Ports

* group

* up

* Addresses

* Typo.

* Redis key

* Redis key as a parameter

* ultimate

* parameters

* job name

* jobs

* Cosmetics

* cosmetics

* cosmetics

* jobs

* Descriptions
2019-08-08 16:09:24 +02:00

37 lines
1.4 KiB
YAML

---
- name: Overwrite Oracle the docker-compose
hosts: oracle
become: true
tasks:
- name: stop the service
shell: service poabridge stop
- name: Slurp docker compose file
slurp:
src: "/home/poadocker/bridge/oracle/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 Oracle containers to the network
set_fact:
docker_compose_parsed: "{{ docker_compose_parsed | combine({'services': {item: {'networks': docker_compose_parsed.services[item].networks | union(['ultimate'])}}}, recursive=True) }}"
with_items: "{{ docker_compose_parsed.services }}"
- name: Expose Redis port to allow connecting from redis-cli
set_fact:
docker_compose_parsed: "{{ docker_compose_parsed | combine({'services': {'redis': {'ports': ['6379:6379']}}}, recursive=True) }}"
- name: Write new docker-compose file
copy:
content: "{{ docker_compose_parsed | to_yaml }}"
dest: "/home/poadocker/bridge/oracle/docker-compose.yml"
- name: start the service
shell: service poabridge start