1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

netplan - let backends handle static ip

This commit is contained in:
Jerry Vonau 2020-04-30 19:33:00 -05:00
parent 4ab0e63214
commit 325db43473

View file

@ -32,15 +32,15 @@
# 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: Static IP computing CIDR #- name: Static IP computing CIDR
shell: netmask {{ wan_ip }}/{{ wan_netmask }} | awk -F "/" '{print $2}' # shell: netmask {{ wan_ip }}/{{ wan_netmask }} | awk -F "/" '{print $2}'
register: CIDR # register: CIDR
when: wan_ip != "dhcp" # when: wan_ip != "dhcp"
- name: Static IP setting CIDR #- name: Static IP setting CIDR
set_fact: # set_fact:
wan_cidr: "{{ CIDR.stdout }}" # wan_cidr: "{{ CIDR.stdout }}"
when: wan_ip != "dhcp" # when: wan_ip != "dhcp"
- name: Remove stock netplan template - name: Remove stock netplan template
file: file: