From d351ef134ec41f7b20b0f1c10d6fd78f09bee6bb Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 24 Dec 2025 09:47:17 +0100 Subject: [PATCH] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Refactor=20net?= =?UTF-8?q?work=20interface=20selection=20to=20use=20ansible=5Ffacts.inter?= =?UTF-8?q?faces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the code to utilize `ansible_facts.interfaces` for selecting network interfaces that start with 'en', improving readability and maintainability. --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 34c49c2..52ea734 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,7 +24,7 @@ - name: Get interfaces starting with "en" set_fact: - en_interfaces: "{{ msg | select('match', '^en') | list }}" + en_interfaces: "{{ ansible_facts.interfaces | select('match', '^en') | list }}" # # ============================================================ # # Normalize and validate configuration