mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
netplan
This commit is contained in:
parent
56ba4d0d19
commit
f83e615b40
1 changed files with 22 additions and 11 deletions
|
@ -4,11 +4,9 @@
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ netplan.stdout_lines }}"
|
- "{{ netplan.stdout_lines }}"
|
||||||
|
|
||||||
- name: Remove stock netplan template
|
- name: Moving 50-cloud-init.yaml to 02-iiab-config.yaml
|
||||||
file:
|
shell: mv /etc/netplan/50-cloud-init.yaml /etc/netplan/02-iiab-config.yaml
|
||||||
state: absent
|
when: netplan.stdout.find("yaml") != -1 and item|trim == "50-cloud-init.yaml"
|
||||||
path: /etc/netplan/{{ item }}
|
|
||||||
when: netplan.stdout.find("yaml") != -1 and item|trim != "02-iiab-config.yaml"
|
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ netplan.stdout_lines }}"
|
- "{{ netplan.stdout_lines }}"
|
||||||
|
|
||||||
|
@ -25,6 +23,11 @@
|
||||||
- systemd-networkd-wait-online
|
- systemd-networkd-wait-online
|
||||||
when: systemd_networkd_active | bool
|
when: systemd_networkd_active | bool
|
||||||
|
|
||||||
|
- name: Ensure systemd-networkd gets enabled for br0
|
||||||
|
set_fact:
|
||||||
|
systemd_networkd_active: True
|
||||||
|
when: network_manager_active | bool and iiab_lan_iface == "br0"
|
||||||
|
|
||||||
# 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
|
||||||
# overrides gui_static_wan_ip that is present. Changing wan_ip in local_vars
|
# overrides gui_static_wan_ip that is present. Changing wan_ip in local_vars
|
||||||
|
@ -39,12 +42,20 @@
|
||||||
wan_cidr: "{{ CIDR.stdout }}"
|
wan_cidr: "{{ CIDR.stdout }}"
|
||||||
when: wan_ip != "dhcp"
|
when: wan_ip != "dhcp"
|
||||||
|
|
||||||
- name: Supply netplan template
|
- name: Remove stock netplan template
|
||||||
template:
|
file:
|
||||||
dest: /etc/netplan/01-iiab-config.yaml
|
state: absent
|
||||||
src: network/netplan.j2
|
path: /etc/netplan/{{ item }}
|
||||||
backup: no
|
when: netplan.stdout.find("yaml") != -1 and item|trim != "02-iiab-config.yaml" and wan_ip != "dhcp"
|
||||||
when: iiab_wan_iface != discovered_wireless_iface
|
with_items:
|
||||||
|
- "{{ netplan.stdout_lines }}"
|
||||||
|
|
||||||
|
#- name: Supply netplan template
|
||||||
|
# template:
|
||||||
|
# dest: /etc/netplan/01-iiab-config.yaml
|
||||||
|
# src: network/netplan.j2
|
||||||
|
# backup: no
|
||||||
|
# when: iiab_wan_iface != discovered_wireless_iface and wan_ip != "dhcp"
|
||||||
|
|
||||||
# should blow up here if we messed up the yml file
|
# should blow up here if we messed up the yml file
|
||||||
#- name: Generate netplan config
|
#- name: Generate netplan config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue