1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

lets not use netplan for bridges

This commit is contained in:
Jerry Vonau 2018-12-14 13:54:46 -06:00
parent 7cade0c052
commit d6690b2537
3 changed files with 36 additions and 36 deletions

View file

@ -111,16 +111,16 @@
tags: tags:
- network - network
- name: NetworkManager in use - non Ubuntu 18 - name: NetworkManager in use
include_tasks: NM-debian.yml include_tasks: NM-debian.yml
when: not is_ubuntu_18 and network_manager_active when: is_debuntu and network_manager_active
#and not installing #and not installing
tags: tags:
- network - network
- name: systemd-networkd in use - non Ubuntu 18 - name: systemd-networkd in use
include_tasks: sysd-netd-debian.yml 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 #and not installing
tags: tags:
- network - network

View file

@ -7,7 +7,7 @@
shell: touch /etc/cloud/cloud-init.disabled shell: touch /etc/cloud/cloud-init.disabled
when: "{{ item }}" == "50-cloud-init.yaml" when: "{{ item }}" == "50-cloud-init.yaml"
with_items: with_items:
- "{{ netplan.stdout_lines }}" - "{{ netplan.stdout }}"
- name: Remove stock netplan template - name: Remove stock netplan template
file: file:
@ -15,20 +15,20 @@
dest: /etc/netplan/{{ item }} dest: /etc/netplan/{{ item }}
when: "{{ item }}" != "" when: "{{ item }}" != ""
with_items: with_items:
- "{{ netplan.stdout_lines }}" - "{{ netplan.stdout }}"
### NM might need attention also ### NM might need attention also
- name: Disable the stock dnsmasq unit file that starts too early with systemd_networkd_active - name: Disable the stock dnsmasq unit file that starts too early with systemd_networkd_active
systemd: systemd:
name: dnsmasq name: dnsmasq
enabled: no enabled: no
when: systemd_networkd_active # when: systemd_networkd_active
- name: Install dnsmasq helper unit file when systemd_networkd_active - name: Install dnsmasq helper unit file when systemd_networkd_active
template: template:
src: network/dnsmasq.service.u18 src: network/dnsmasq.service.u18
dest: /etc/systemd/system/iiab-dnsmasq.service 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 - name: Ensure required dnsmasq unit files are enabled for reboot systemd_networkd_active
systemd: systemd:
@ -37,7 +37,7 @@
with_items: with_items:
- iiab-dnsmasq - iiab-dnsmasq
- systemd-networkd-wait-online - 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 # 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 # gui_static_wan turns dhcp on/off through wan_ip in computed_network and
@ -59,20 +59,20 @@
src: network/netplan.j2 src: network/netplan.j2
backup: no backup: no
- name: Generate netplan config #- name: Generate netplan config
shell: netplan generate --debug # shell: netplan generate --debug
- name: Stopping services #- name: Stopping services
include_tasks: down-debian.yml # include_tasks: down-debian.yml
# wants a controlling terminal for the ENTER key, so it fails # wants a controlling terminal for the ENTER key, so it fails
- name: Test netplan config #- name: Test netplan config
shell: netplan try --debug --timeout=2 # shell: netplan try --debug --timeout=2
register: test-netplan # register: test-netplan
ignore_errors: True # ignore_errors: True
# and does not apply the generated config until rebooted # and does not apply the generated config until rebooted
# or ignore the above test - on the fence atm... # or ignore the above test - on the fence atm...
- name: Reload netplan #- name: Reload netplan
shell: netplan apply # shell: netplan apply
when: not no_net_restart and test-netplan == "Configuration accepted" # when: not no_net_restart and test-netplan == "Configuration accepted"

View file

@ -23,19 +23,19 @@ network:
dhcp4: true dhcp4: true
optional: true optional: true
{% endif %} {% endif %}
{% if iiab_lan_iface == "br0" %} #{% if iiab_lan_iface == "br0" %}
bridges: # bridges:
# the key name is the name for virtual (created) interfaces # # the key name is the name for virtual (created) interfaces
br0: # br0:
# IDs of the components; switchports expands into multiple interfaces # # IDs of the components; switchports expands into multiple interfaces
# interfaces: [switchports] # # interfaces: [switchports]
# should really compute the netmask like the wan side # # should really compute the netmask like the wan side
addresses: [ {{ lan_ip }}/19] # addresses: [ {{ lan_ip }}/19]
# there should really not be a gateway present testing to prove # # there should really not be a gateway present testing to prove
gateway4: {{ lan_ip }} # gateway4: {{ lan_ip }}
nameservers: # nameservers:
addresses: [{{ lan_ip }}] # addresses: [{{ lan_ip }}]
parameters: # parameters:
forward-delay: 0 # forward-delay: 0
stp: false # stp: false
{% endif %} #{% endif %}