Reboot to get new ip

This commit is contained in:
2018-11-21 23:25:10 -05:00
parent 945b679157
commit 1be4118bdf

View File

@@ -10,7 +10,7 @@
template: src=../roles/configure-interfaces/templates/eth.cfg.j2 dest=/etc/network/interfaces.d/{{ interface_name }}.cfg
- name: Up down interface
shell: "(sleep 3s; ifdown {{ interface_name }} && ifup {{ interface_name }};) &"
shell: "bash -c 'sleep 15s; reboot;' &"
ignore_errors: true
vars:
interface_name: "{{ ansible_default_ipv4.interface }}"