refactor ♻️: Refactor network interface selection to use ansible_facts.interfaces
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 9s
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user