--- - name: Read one page of SSLNexus inventory hosts: localhost gather_facts: false connection: local vars: admin_origin: "{{ lookup('env', 'SSLNEXUS_URL') | regex_replace('/$', '') }}" after: "{{ lookup('env', 'SSLNEXUS_AFTER') }}" tasks: - name: Check the HTTPS origin and read credential ansible.builtin.assert: that: - admin_origin is match('^https://') - lookup('env', 'SSLNEXUS_TOKEN') | length > 0 - name: Read authorised certificates ansible.builtin.uri: url: "{{ admin_origin }}/api/v1/certificates?limit=100&after={{ after | urlencode }}" headers: Authorization: "Bearer {{ lookup('env', 'SSLNEXUS_TOKEN') }}" follow_redirects: none validate_certs: true return_content: true register: inventory no_log: true - name: Show inventory and continuation cursor ansible.builtin.debug: var: inventory.json