diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml index a4e8ce098..3d8473888 100644 --- a/roles/network/tasks/main.yml +++ b/roles/network/tasks/main.yml @@ -111,16 +111,16 @@ tags: - network -- name: NetworkManager in use - non Ubuntu 18 +- name: NetworkManager in use include_tasks: NM-debian.yml - when: not is_ubuntu_18 and network_manager_active + when: is_debuntu and network_manager_active #and not installing tags: - network -- name: systemd-networkd in use - non Ubuntu 18 +- name: systemd-networkd in use include_tasks: sysd-netd-debian.yml - when: not is_ubuntu_18 and is_debuntu and systemd_networkd_active + when: is_debuntu and systemd_networkd_active #and not installing tags: - network diff --git a/roles/network/tasks/netplan.yml b/roles/network/tasks/netplan.yml index b6214f018..2c43305f6 100644 --- a/roles/network/tasks/netplan.yml +++ b/roles/network/tasks/netplan.yml @@ -7,7 +7,7 @@ shell: touch /etc/cloud/cloud-init.disabled when: "{{ item }}" == "50-cloud-init.yaml" with_items: - - "{{ netplan.stdout_lines }}" + - "{{ netplan.stdout }}" - name: Remove stock netplan template file: @@ -15,20 +15,20 @@ dest: /etc/netplan/{{ item }} when: "{{ item }}" != "" with_items: - - "{{ netplan.stdout_lines }}" + - "{{ netplan.stdout }}" ### NM might need attention also - name: Disable the stock dnsmasq unit file that starts too early with systemd_networkd_active systemd: name: dnsmasq enabled: no - when: systemd_networkd_active +# when: systemd_networkd_active - name: Install dnsmasq helper unit file when systemd_networkd_active template: src: network/dnsmasq.service.u18 dest: /etc/systemd/system/iiab-dnsmasq.service - when: systemd_networkd_active +# when: systemd_networkd_active - name: Ensure required dnsmasq unit files are enabled for reboot systemd_networkd_active systemd: @@ -37,7 +37,7 @@ with_items: - iiab-dnsmasq - systemd-networkd-wait-online - when: systemd_networkd_active +# when: systemd_networkd_active # ICO will always set gui_static_wan_ip away from the default of 'unset' while # gui_static_wan turns dhcp on/off through wan_ip in computed_network and @@ -59,20 +59,20 @@ src: network/netplan.j2 backup: no -- name: Generate netplan config - shell: netplan generate --debug +#- name: Generate netplan config +# shell: netplan generate --debug -- name: Stopping services - include_tasks: down-debian.yml +#- name: Stopping services +# include_tasks: down-debian.yml # wants a controlling terminal for the ENTER key, so it fails -- name: Test netplan config - shell: netplan try --debug --timeout=2 - register: test-netplan - ignore_errors: True +#- name: Test netplan config +# shell: netplan try --debug --timeout=2 +# register: test-netplan +# ignore_errors: True # and does not apply the generated config until rebooted # or ignore the above test - on the fence atm... -- name: Reload netplan - shell: netplan apply - when: not no_net_restart and test-netplan == "Configuration accepted" +#- name: Reload netplan +# shell: netplan apply +# when: not no_net_restart and test-netplan == "Configuration accepted" diff --git a/roles/network/templates/network/netplan.j2 b/roles/network/templates/network/netplan.j2 index d54cf748a..9223307d4 100644 --- a/roles/network/templates/network/netplan.j2 +++ b/roles/network/templates/network/netplan.j2 @@ -23,19 +23,19 @@ network: dhcp4: true optional: true {% endif %} -{% if iiab_lan_iface == "br0" %} - bridges: - # the key name is the name for virtual (created) interfaces - br0: - # IDs of the components; switchports expands into multiple interfaces - # interfaces: [switchports] - # should really compute the netmask like the wan side - addresses: [ {{ lan_ip }}/19] - # there should really not be a gateway present testing to prove - gateway4: {{ lan_ip }} - nameservers: - addresses: [{{ lan_ip }}] - parameters: - forward-delay: 0 - stp: false -{% endif %} +#{% if iiab_lan_iface == "br0" %} +# bridges: +# # the key name is the name for virtual (created) interfaces +# br0: +# # IDs of the components; switchports expands into multiple interfaces +# # interfaces: [switchports] +# # should really compute the netmask like the wan side +# addresses: [ {{ lan_ip }}/19] +# # there should really not be a gateway present testing to prove +# gateway4: {{ lan_ip }} +# nameservers: +# addresses: [{{ lan_ip }}] +# parameters: +# forward-delay: 0 +# stp: false +#{% endif %}