refactor ♻️: Refactor task to use ansible.builtin.set_fact for clarity
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 9s
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 9s
Updated the task to use `ansible.builtin.set_fact` instead of a custom module for better readability and maintainability.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
{{ ansible_facts.interfaces }}
|
||||
|
||||
- name: Get interfaces starting with "en"
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
en_interfaces: "{{ ansible_facts.interfaces | select('match', '^en') | list }}"
|
||||
|
||||
# # ============================================================
|
||||
|
||||
Reference in New Issue
Block a user