Reboot is needed. Ifup down does not always get rid of the template ip
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
interface_name: "{{ ansible_default_ipv4.interface }}"
|
||||
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 }};) &"
|
||||
- name: Reboot instance to pickup new network config
|
||||
shell: "bash -c 'sleep 15s; reboot;' &"
|
||||
ignore_errors: true
|
||||
vars:
|
||||
interface_name: "{{ ansible_default_ipv4.interface }}"
|
||||
|
||||
Reference in New Issue
Block a user