1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

Merge pull request #805 from jvonau/enabled-runtime

handle systemd-networkd having enabled-runtime
This commit is contained in:
A Holt 2018-05-20 13:18:12 -04:00 committed by GitHub
commit a752d790a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -28,6 +28,11 @@
systemd_networkd_active: True
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
set_fact:
network_manager_active: True

View file

@ -38,13 +38,18 @@
wan_cidr: "{{ CIDR.stdout }}"
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
# 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
# is a oneway street to static.
- name: Supply static template
template:
dest: /etc/netplan/50-cloud-init.yaml
dest: /etc/netplan/{{ netplan.stdout }}
src: network/cloud-init.j2
backup: no
when: (wan_ip != "dhcp" or gui_static_wan_ip == "undefined") and is_ubuntu_18