forked from evolix/ansible-roles
detect presence of hotplug network interface
This commit is contained in:
parent
eec84fca8a
commit
53a1134b6f
|
@ -140,12 +140,19 @@
|
||||||
|
|
||||||
## network interfaces
|
## network interfaces
|
||||||
|
|
||||||
|
- name: "Is there an \"allow-hotplug\" interface ?"
|
||||||
|
command: grep allow-hotplug /etc/network/interfaces
|
||||||
|
failed_when: False
|
||||||
|
changed_when: False
|
||||||
|
check_mode: no
|
||||||
|
register: grep_hotplug_eni
|
||||||
|
|
||||||
- name: "Network interfaces must be \"auto\" and not \"allow-hotplug\""
|
- name: "Network interfaces must be \"auto\" and not \"allow-hotplug\""
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/network/interfaces
|
dest: /etc/network/interfaces
|
||||||
regexp: "allow-hotplug"
|
regexp: "allow-hotplug"
|
||||||
replace: "auto"
|
replace: "auto"
|
||||||
backup: yes
|
backup: yes
|
||||||
when: evolinux_system_eni_auto
|
when: evolinux_system_eni_auto and grep_hotplug_eni.rc == 0
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
Loading…
Reference in a new issue