mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #805 from jvonau/enabled-runtime
handle systemd-networkd having enabled-runtime
This commit is contained in:
commit
a752d790a3
2 changed files with 11 additions and 1 deletions
|
@ -28,6 +28,11 @@
|
||||||
systemd_networkd_active: True
|
systemd_networkd_active: True
|
||||||
when: 'ansible_local.local_facts.systemd_networkd == "enabled"'
|
when: 'ansible_local.local_facts.systemd_networkd == "enabled"'
|
||||||
|
|
||||||
|
- name: Setting systemd_networkd-2 results
|
||||||
|
set_fact:
|
||||||
|
systemd_networkd_active: True
|
||||||
|
when: 'ansible_local.local_facts.systemd_networkd == "enabled-runtime"'
|
||||||
|
|
||||||
- name: Setting network_manager results
|
- name: Setting network_manager results
|
||||||
set_fact:
|
set_fact:
|
||||||
network_manager_active: True
|
network_manager_active: True
|
||||||
|
|
|
@ -38,13 +38,18 @@
|
||||||
wan_cidr: "{{ CIDR.stdout }}"
|
wan_cidr: "{{ CIDR.stdout }}"
|
||||||
when: wan_ip != "dhcp"
|
when: wan_ip != "dhcp"
|
||||||
|
|
||||||
|
- name: Figure out netplan file name on Ubuntu 18
|
||||||
|
shell: ls /etc/netplan
|
||||||
|
register: netplan
|
||||||
|
when: is_ubuntu_18
|
||||||
|
|
||||||
# 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
|
||||||
# is a oneway street to static.
|
# is a oneway street to static.
|
||||||
- name: Supply static template
|
- name: Supply static template
|
||||||
template:
|
template:
|
||||||
dest: /etc/netplan/50-cloud-init.yaml
|
dest: /etc/netplan/{{ netplan.stdout }}
|
||||||
src: network/cloud-init.j2
|
src: network/cloud-init.j2
|
||||||
backup: no
|
backup: no
|
||||||
when: (wan_ip != "dhcp" or gui_static_wan_ip == "undefined") and is_ubuntu_18
|
when: (wan_ip != "dhcp" or gui_static_wan_ip == "undefined") and is_ubuntu_18
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue