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 }}"
|
||||
- name: network-interfaces | Install the network interface file
|
||||
ansible.builtin.template:
|
||||
src: 70-ansible.yaml.j2
|
||||
src: netplan-70-ansible.yaml.j2
|
||||
dest: /etc/netplan/70-ansible.yaml
|
||||
owner: root
|
||||
group: root
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
{% for int in ubuntu_netplan_interfaces %}
|
||||
{% for int in new_ints %}
|
||||
{{ int.name }}:
|
||||
dhcp4: {{ int.dhcp4 }}
|
||||
{% if int.dhcp_overrides | default(true) %}
|
Loading…
Reference in New Issue