From b9d97bce4fc5e0b4f6397424747ff2001f7fddaf Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 22 Nov 2017 13:57:48 -0600 Subject: [PATCH] provide NetworkManager.conf - and move prior to daemon-reload --- roles/network/tasks/debian.yml | 20 +++++++++++++------ .../templates/network/NetworkManager.conf | 8 ++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 roles/network/templates/network/NetworkManager.conf diff --git a/roles/network/tasks/debian.yml b/roles/network/tasks/debian.yml index 89144ab98..6e676c2f4 100644 --- a/roles/network/tasks/debian.yml +++ b/roles/network/tasks/debian.yml @@ -57,6 +57,20 @@ service: name=dnsmasq state=stopped when: dnsmasq_install +# do this +- name: Copy NetworkManager.conf for has_NM + template: dest=/etc/NetworkManager/NetworkManager.conf + src=network/NetworkManager.conf + when: has_NM and iiab_lan_iface == "br0" + +# NM might have a watcher on this path and we don't have to restart NM +- name: Copy the bridge script for has_NM + template: dest=/etc/network/interfaces + src=network/systemd.j2 + when: has_NM and iiab_lan_iface == "br0" + +# or provide keyfile layout like the XO's used way back. + - name: Reload systemd shell: systemctl daemon-reload @@ -69,12 +83,6 @@ service: name=networking state=restarted when: not nobridge is defined and not has_NM and not no_net_restart -# NM might have a watcher on this path and we don't have to restart NM -- name: Copy the bridge script for has_NM - template: dest=/etc/network/interfaces - src=network/systemd.j2 - when: has_NM and iiab_lan_iface == "br0" - - name: Restart hostapd when WiFi is present service: name=hostapd state=restarted when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance" diff --git a/roles/network/templates/network/NetworkManager.conf b/roles/network/templates/network/NetworkManager.conf new file mode 100644 index 000000000..06c5d59a6 --- /dev/null +++ b/roles/network/templates/network/NetworkManager.conf @@ -0,0 +1,8 @@ +[main] +plugins=ifupdown,keyfile + +[ifupdown] +managed=true + +[device] +wifi.scan-rand-mac-address=no