Skip to content

Commit

Permalink
Get the log of the pre and post-deploy command in case of an error
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Dec 4, 2023
1 parent 68c7b7a commit 72e9cba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deploy_pgcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
loop: "{{ pre_deploy_command_hosts.split(',') | map('extract', groups) | list | flatten }}"
async: "{{ pre_deploy_command_timeout }}" # run the command asynchronously
poll: 0
ignore_errors: true # allows to collect logs before stopping execution (in case of failure)

- name: Wait for the pre-deploy command to complete
ansible.builtin.async_status:
Expand All @@ -155,6 +154,7 @@
until: pre_deploy_job_result.finished
retries: "{{ (pre_deploy_command_timeout | int) // 10 }}"
delay: 10
ignore_errors: true # allows to collect logs before stopping execution (in case of failure)
when:
- pre_deploy_result.results is defined
- item.ansible_job_id is defined
Expand Down Expand Up @@ -365,7 +365,6 @@
loop: "{{ post_deploy_command_hosts.split(',') | map('extract', groups) | list | flatten }}"
async: "{{ post_deploy_command_timeout }}" # run the command asynchronously
poll: 0
ignore_errors: true # allows to collect logs before stopping execution (in case of failure)

- name: Wait for the post-deploy command to complete
ansible.builtin.async_status:
Expand All @@ -378,6 +377,7 @@
until: post_deploy_job_result.finished
retries: "{{ (post_deploy_command_timeout | int) // 10 }}"
delay: 10
ignore_errors: true # allows to collect logs before stopping execution (in case of failure)
when:
- post_deploy_result.results is defined
- item.ansible_job_id is defined
Expand Down

0 comments on commit 72e9cba

Please sign in to comment.