refactor ♻️: Refactor task names and conditions for better clarity and functionality

This refactoring improves the readability and logic of task management by renaming variables and simplifying conditional statements.
This commit is contained in:
2025-12-24 10:32:25 +01:00
parent 4c20e2a7ae
commit b7f743021f

View File

@@ -17,16 +17,16 @@
- network
when: ansible_facts.interfaces is not defined
- name: Display WOL status per interface
- name: Display interfaces
ansible.builtin.debug:
msg: >
{{ ansible_facts.interfaces }}
- name: Get interfaces starting with "en"
- name: Get interfaces starting with "en" or "eth"
ansible.builtin.set_fact:
en_interfaces: "{{ ansible_facts.interfaces | select('match', '^eth|^ens|^enp') | unique | list }}"
- name: Display WOL interface
- name: Display selected interfaces
ansible.builtin.debug:
msg: >
{{ en_interfaces }}