Try to automate the interface names resolution.
This commit is contained in:
parent
9cc7139c2f
commit
23955f65c8
|
|
@ -30,7 +30,7 @@
|
||||||
msg: "Interfaces list: {{ new_ints }}"
|
msg: "Interfaces list: {{ new_ints }}"
|
||||||
- name: network-interfaces | Install the network interface file
|
- name: network-interfaces | Install the network interface file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: 70-ansible.yaml.j2
|
src: netplan-70-ansible.yaml.j2
|
||||||
dest: /etc/netplan/70-ansible.yaml
|
dest: /etc/netplan/70-ansible.yaml
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
network:
|
network:
|
||||||
version: 2
|
version: 2
|
||||||
ethernets:
|
ethernets:
|
||||||
{% for int in ubuntu_netplan_interfaces %}
|
{% for int in new_ints %}
|
||||||
{{ int.name }}:
|
{{ int.name }}:
|
||||||
dhcp4: {{ int.dhcp4 }}
|
dhcp4: {{ int.dhcp4 }}
|
||||||
{% if int.dhcp_overrides | default(true) %}
|
{% if int.dhcp_overrides | default(true) %}
|
||||||
Loading…
Reference in New Issue