Skip to content

Commit

Permalink
Fix prompt when there are multiple hosts in the ansible play
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmoguy committed Dec 15, 2024
1 parent 6d74a95 commit bf69891
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

Check failure on line 24 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

name[casing]

All names should start with an uppercase letter.
Expand Down

0 comments on commit bf69891

Please sign in to comment.