testnet-ops/nitro-bridge-demo-setup/stop-deployments.yml

58 lines
2.2 KiB
YAML

- name: Stop and cleanup deployments for nitro bridge demo
hosts: "{{ target_host }}"
vars_files:
- vars.yml
environment:
PATH: "{{ ansible_env.PATH }}/home/{{ansible_user}}/bin"
tasks:
- name: Stop the deployment for Alice's nitro node on L1
command: laconic-so deployment --dir l1alice-nitro-deployment stop {{ '--delete-volumes' if remove_deployment_dir else '' }}
args:
chdir: "{{ nitro_directory }}"
- name: Stop the deployment for Charlie's nitro node on L1
command: laconic-so deployment --dir l1charlie-nitro-deployment stop {{ '--delete-volumes' if remove_deployment_dir else '' }}
args:
chdir: "{{ nitro_directory }}"
- name: Stop the deployment for Alice's nitro node on L2
command: laconic-so deployment --dir l2alice-nitro-deployment stop {{ '--delete-volumes' if remove_deployment_dir else '' }}
args:
chdir: "{{ nitro_directory }}"
- name: Stop the deployment for Charlie's nitro node on L2
command: laconic-so deployment --dir l2charlie-nitro-deployment stop {{ '--delete-volumes' if remove_deployment_dir else '' }}
args:
chdir: "{{ nitro_directory }}"
- name: Stop the bridge deployment
command: laconic-so deployment --dir bridge-deployment stop {{ '--delete-volumes' if remove_deployment_dir else '' }}
args:
chdir: "{{ nitro_directory }}"
- name: Stop the nitro-contracts deployment
command: laconic-so deployment --dir nitro-contracts-deployment stop {{ '--delete-volumes' if remove_deployment_dir else '' }}
args:
chdir: "{{ nitro_directory }}"
- name: Stop the deployment for fixturenet optimism
command: laconic-so deployment --dir fixturenet-optimism-deployment stop {{ '--delete-volumes' if remove_deployment_dir else '' }}
args:
chdir: "{{ nitro_directory }}"
- name: Stop the deployment for fixturenet eth
command: laconic-so deployment --dir fixturenet-eth-deployment stop {{ '--delete-volumes' if remove_deployment_dir else '' }}
args:
chdir: "{{ nitro_directory }}"
- name: Remove the deployment directory
file:
path: "{{ nitro_directory }}"
state: absent
when: remove_deployment_dir
become: yes