Ok my fault. Playbook is working fine. Just mistakenly used description as interface instead of interface name.... After changing, everything is perfect.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu#Will trigger a manual/undefined wake:
POST /wol/wol/set {wake: {interface: "opt22", mac: "b4:2e:99:30:da:dd"}} - name: Send Wake-on-LAN
ansible.builtin.uri:
url: "{{ opnsense_instances[opnsense_instance].url }}"
method: POST
user: "{{ opnsense_instances[opnsense_instance].api_key }}"
password: "{{ opnsense_instances[opnsense_instance].api_secret }}"
force_basic_auth: true
body_format: json
body:
wake:
interface: "{{ opnsense_interface }}"
mac: "{{ mac }}"
validate_certs: false
when: not host_was_online
delegate_to: localhost