I have a very simple ansible playbook that replaces the /etc/netplan/config.yml.
and then restarts netplan.
The issue is that when restarting netplan the IP address changes, so ansible hangs indeffinatly.
How can i avoid this? I want to just run the command and not wait for a response, or run a command and then test on the new IP.
I can't find anything in the documentation,
Its a very simple role -
task/main.yml
- name: Updating Network Configuration
template: src=config.yml dest=/etc/netplan/config.yaml
notify: start netplan
handlers/main.yml
- name: start netplan
shell: netplan apply
I'd like to add, just tried this..which should fire/forget but it still hangs
- name: start netplan
shell: netplan apply
async: 1
poll: 0
I had exactly the same issue and async worked fine for me :
- name: Apply netplan
command: sudo netplan apply
async: 45
poll: 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With