Skip to content

Commit

Permalink
Replace ansible.builtin.pause with ansible.builtin.wait_for
Browse files Browse the repository at this point in the history
This fixes an issue when running with strategy free:
> ERROR! The 'ansible.builtin.pause' module bypasses the host loop, which
> is currently not supported in the free strategy and would instead
> execute for every host in the inventory list.

Furthermore, the documentation for ansible.builtin.pause states:
To pause/wait/sleep per host, use the ansible.builtin.wait_for module.

See https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pause_module.html
  • Loading branch information
jhohwieler committed Aug 20, 2024
1 parent 5ff9992 commit 0a8c1bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions roles/sap_control/tasks/functions/restart_sapstartsrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
register: sap_start_sapstartsrv

- name: SAPstartsrv - Wait for 10 seconds for sapstartsrv to initialize
ansible.builtin.pause:
seconds: 10
ansible.builtin.wait_for:
timeout: 10
4 changes: 2 additions & 2 deletions roles/sap_control/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
msg: "{{ sap_facts_register.sap_facts }}"

- name: pause for 10 Seconds
ansible.builtin.pause:
seconds: 10
ansible.builtin.wait_for:
timeout: 10

# Debugging stuff
- name: Display parameters for runtime
Expand Down

0 comments on commit 0a8c1bd

Please sign in to comment.