refactor ♻️: Refactor network interface selection to use ansible_facts.interfaces
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 9s

Updated the code to utilize `ansible_facts.interfaces` for selecting network interfaces that start with 'en', improving readability and maintainability.
This commit is contained in:
2025-12-24 09:47:17 +01:00
parent 6a873433f1
commit d351ef134e

View File

@@ -24,7 +24,7 @@
- name: Get interfaces starting with "en" - name: Get interfaces starting with "en"
set_fact: set_fact:
en_interfaces: "{{ msg | select('match', '^en') | list }}" en_interfaces: "{{ ansible_facts.interfaces | select('match', '^en') | list }}"
# # ============================================================ # # ============================================================
# # Normalize and validate configuration # # Normalize and validate configuration