- hosts: datacenter
  name: Switch server
  ignore_unreachable: false

  tasks:
    - name: Unifi Modifi
      ansible.builtin.uri:
        url: http://192.168.77.101:8123/api/webhook/-WcEse1k5QxIBlQu5B0u-5Esb?server=nas
        method: POST
      when: inventory_hostname == destination and destination == "nas.home.lan"
    - name: Unifi Modifi
      ansible.builtin.uri:
        url: http://192.168.77.101:8123/api/webhook/-WcEse1k5QxIBlQu5B0u-5Esb?server=m-server
        method: POST
      when: inventory_hostname == destination and destination == "m-server.home.lan"