refactor ♻️: Refactor interface filter to include 'nic'
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 10s

Updated the interface filter to include the 'nic' option, enhancing the filtering capabilities.
This commit is contained in:
2026-01-24 12:29:17 +01:00
parent 00a6fcc966
commit 907592b88b

View File

@@ -26,12 +26,12 @@
# ansible.builtin.set_fact: # ansible.builtin.set_fact:
# en_interfaces: "{{ ansible_facts.interfaces | select('match', '^eth|^ens|^enp') | unique | list }}" # en_interfaces: "{{ ansible_facts.interfaces | select('match', '^eth|^ens|^enp') | unique | list }}"
- name: Get interfaces starting with "en or "eth" - name: Get interfaces starting with "en, "eth" or "nic"
ansible.builtin.set_fact: ansible.builtin.set_fact:
en_interfaces: >- en_interfaces: >-
{{ {{
ansible_facts.interfaces ansible_facts.interfaces
| select('match', '^(eth|en)') | select('match', '^(eth|en|nic)')
| list | list
}} }}