- name: Play Name
  hosts: localhost
  vars:
    org_id: XXXXXXXX
  gather_facts: false
  tasks:
    - name: Get all organizations _devices
      cisco.meraki.organizations_devices_info:
        meraki_suppress_logging: true
        organizationId: "{{ org_id }}"
        total_pages: -1
      register: result
    - name: Filter APs with "wireless" productTypes and get Serial Number
      ansible.builtin.set_fact:
        filtered_aps:
          "{{ result.meraki_response | selectattr('productType', 'contains',
          'wireless') | map(attribute='serial') | list }}"
      register: aps
    - name: Show All Devices
      ansible.builtin.debug:
        msg: "{{ aps }}"
