Refactor playbook.yml to improve contract deployment and execution handling. Added asynchronous execution with polling for contract deployment and call commands, ensuring successful completion checks. Updated shell command execution to use /bin/bash for consistency.
This commit is contained in:
parent
04efc25a48
commit
b006ea31b0
12
playbook.yml
12
playbook.yml
@ -242,9 +242,13 @@
|
||||
register: contract_deploy_output
|
||||
args:
|
||||
chdir: "{{ ansible_env.HOME }}/node"
|
||||
executable: /bin/bash
|
||||
retries: 5
|
||||
delay: 120
|
||||
failed_when: '"ONCHAIN EXECUTION COMPLETE & SUCCESSFUL" not in contract_deploy_output.stdout'
|
||||
async: 120
|
||||
poll: 30
|
||||
until: '"ONCHAIN EXECUTION COMPLETE & SUCCESSFUL" in contract_deploy_output.stdout'
|
||||
failed_when: false
|
||||
|
||||
- name: Update CallContract.s.sol with contract address
|
||||
ansible.builtin.shell: bash update_contracts.sh
|
||||
@ -256,9 +260,13 @@
|
||||
register: contract_call_output
|
||||
args:
|
||||
chdir: "{{ ansible_env.HOME }}/node"
|
||||
executable: /bin/bash
|
||||
retries: 5
|
||||
delay: 120
|
||||
failed_when: '"ONCHAIN EXECUTION COMPLETE & SUCCESSFUL" not in contract_call_output.stdout'
|
||||
async: 120
|
||||
poll: 30
|
||||
until: '"ONCHAIN EXECUTION COMPLETE & SUCCESSFUL" in contract_call_output.stdout'
|
||||
failed_when: false
|
||||
|
||||
# - name: Set Docker containers to restart unless stopped
|
||||
# ansible.builtin.shell: |
|
||||
|
Loading…
Reference in New Issue
Block a user