mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
handle different netplan file name
This commit is contained in:
parent
5ca184297e
commit
7501d256f8
1 changed files with 6 additions and 1 deletions
|
@ -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