From 9672cddfc26f62e922772fb5277b4081a1feb487 Mon Sep 17 00:00:00 2001 From: jaydee Date: Mon, 18 Sep 2023 17:28:09 +0200 Subject: [PATCH] upt playbook --- playbooks/wol_enable.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/playbooks/wol_enable.yml b/playbooks/wol_enable.yml index adb7470..a9bb763 100644 --- a/playbooks/wol_enable.yml +++ b/playbooks/wol_enable.yml @@ -5,10 +5,12 @@ - name: Display all interfaces name debug: var: ansible_facts.interfaces - - name: Display all interfaces name - debug: msg="{{ item }}" - when: "{{ item }} | map('match','enp.*')" - with_items: "{{ ansible_interfaces }}" + - name: Get wifi adapter + set_fact: + wifi_adapter: '{{ item }}' + loop: '{{ ansible_facts.interfaces }}' + when: 'item.startswith("en")' + - name: Creating config become: yes ansible.builtin.copy: