detect presence of hotplug network interface

This commit is contained in:
Jérémy Lecour 2017-04-21 14:12:15 +02:00 committed by Jérémy Lecour
parent eec84fca8a
commit 53a1134b6f

View file

@ -140,12 +140,19 @@
## 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\""
replace:
dest: /etc/network/interfaces
regexp: "allow-hotplug"
replace: "auto"
backup: yes
when: evolinux_system_eni_auto
when: evolinux_system_eni_auto and grep_hotplug_eni.rc == 0
- meta: flush_handlers