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: