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:
- 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

View file

@ -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"

View file

@ -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 %}