The networks check is wrong
This commit is contained in:
parent
5e10b333bc
commit
10e5faad5e
|
@ -19,6 +19,9 @@
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
new_ints: "[{% for i in ansible_interfaces %}{% if i != ansible_lo.device or i != ansible_default_ipv4.interface %}{{ i }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}]"
|
new_ints: "[{% for i in ansible_interfaces %}{% if i != ansible_lo.device or i != ansible_default_ipv4.interface %}{{ i }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}]"
|
||||||
when: net_ints is not defined or net_ints == None or net_ints | length == 0
|
when: net_ints is not defined or net_ints == None or net_ints | length == 0
|
||||||
|
- name: network-interfaces | Print the additional interfaces
|
||||||
|
ansible.builtin.debug:
|
||||||
|
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: 70-ansible.yaml.j2
|
||||||
|
@ -26,5 +29,5 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when: net_ints is not defined or net_ints == None or net_ints | length == 0
|
when: net_ints is defined and net_ints | length != 0
|
||||||
notify: Netplan Apply
|
notify: Netplan Apply
|
||||||
|
|
Loading…
Reference in New Issue