Hi All,
I’ve looked around the web trying to find a definitive answer as to the “best” way to acheive my desired results, but I need some feedback from the collective wisdom of the Community, please.
In short, at the end of a playbook I have as the penultimate task a task to change the IP Address of my target host, and then as the last task a task to reload the NIC. This is working on the host, but because the IP Address changes ansible looses the SSH connection and hangs. What I’d like to have happen is for the reload task to simple end, which means the playbook will end.
I think that using async with a poll of 0 is one way to do this, but is this the “best” way to do it, and if so would the task look like the sample below?
- name: Restart The NIC
community.general.nmcli:
conn_name: eno1
conn_reload: true
state: up
async: 5
poll: 0
Thanks in advance
Dulux-Oz