diff --git a/roles/ifupdown2/handlers/main.yml b/roles/ifupdown2/handlers/main.yml index a065d26..9a5d0c0 100644 --- a/roles/ifupdown2/handlers/main.yml +++ b/roles/ifupdown2/handlers/main.yml @@ -3,4 +3,7 @@ systemd: name: networking.service state: restarted + +- name: Bring all interfaces up + shell: /usr/sbin/ifup -a ... diff --git a/roles/ifupdown2/tasks/main.yml b/roles/ifupdown2/tasks/main.yml index 5b1ed81..aa07c7f 100644 --- a/roles/ifupdown2/tasks/main.yml +++ b/roles/ifupdown2/tasks/main.yml @@ -32,6 +32,7 @@ mode: u=rw,g=r,o= notify: - Restart networking + - Bring all interfaces up - name: Enable and start networking systemd: diff --git a/roles/ifupdown2/templates/interfaces.j2 b/roles/ifupdown2/templates/interfaces.j2 index 81ce05f..d61606c 100644 --- a/roles/ifupdown2/templates/interfaces.j2 +++ b/roles/ifupdown2/templates/interfaces.j2 @@ -1,7 +1,7 @@ {{ ansible_managed | comment }} {% for name, iface in ifupdown2__interfaces.items() %} -allow-hotplug {{ name }} +auto {{ name }} iface {{ name }} {% for address in iface.addresses %} address {{ address | ipaddr }}