Skip to content

Commit

Permalink
Merge pull request #34 from wandansible/fix-network-config-prompt
Browse files Browse the repository at this point in the history
Fix prompt when there are multiple hosts in the ansible play
  • Loading branch information
gizmoguy authored Dec 15, 2024
2 parents 6d74a95 + bf69891 commit 30f49a3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
- name: Prompt before changing network configuration
ansible.builtin.pause:
prompt: |-
Current network state:
Current network state for {{ item }}:
{{ _network_state.stdout }}
{{ hostvars[item]["_network_state"].stdout }}
Please check the network configuration changes. Press enter to apply or ctrl-c to stop
when: network_wait_on_change
loop: "{{ play_hosts }}"
when:
- network_wait_on_change
- hostvars[item]["_network_state"] is defined
listen: confirm network change

- name: restart networking
Expand Down

0 comments on commit 30f49a3

Please sign in to comment.