feat ✨: Add task extraction and display of Wake-on values
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s
This commit introduces a new feature that extracts and displays Wake-on values from the `wol_status` endpoint. This enhancement allows for better monitoring and management of device wake-up capabilities.
This commit is contained in:
@@ -57,6 +57,25 @@
|
||||
var: wol_status
|
||||
|
||||
|
||||
- name: Extract Supports Wake-on value
|
||||
set_fact:
|
||||
supports_wake_on: "{{ wol_status.stdout | regex_search('Supports Wake-on:\\s*(\\S+)', '\\1') }}"
|
||||
|
||||
- name: Show Supports Wake-on value
|
||||
debug:
|
||||
msg: "Wake-on is {{ supports_wake_on }}"
|
||||
|
||||
|
||||
- name: Extract Wake-on value
|
||||
set_fact:
|
||||
wake_on: "{{ wol_status.stdout | regex_search('Wake-on:\\s*(\\S+)', '\\1') }}"
|
||||
|
||||
- name: Show Wake-on value
|
||||
debug:
|
||||
msg: "Wake-on is {{ wake_on }}"
|
||||
|
||||
|
||||
|
||||
- name: Display WoL status
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ item.item }}:\n{{ item.stdout | default('No output') }}"
|
||||
|
||||
Reference in New Issue
Block a user