# create a report on existing mesh nodes - block: - name: try calling the server to get a list of the mesh nodes ansible.builtin.uri: url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes' method: GET headers: Content-Type: 'application/json' Accept: 'application/json' Authorization: 'Basic {{ mesh_basic_auth }}' timeout: 60 register: mesh_nodes_report retries: 5 delay: 10 no_log: True # http headers contain auth strings - name: set bitbucket dc cluster available fact ansible.builtin.set_fact: bitbucket_cluster_available: true - name: print out the mesh_nodes_report ansible.builtin.debug: msg: "{{ mesh_nodes_report.json }}" when: - mesh_nodes_report.status == 200 - name: set mesh_nodenames_list ansible.builtin.set_fact: mesh_nodenames_list: "{{ mesh_nodes_report | json_query('json[*].name') }}" when: mesh_nodes_report.status == 200 - name: print out the mesh_nodenames_list ansible.builtin.debug: var: mesh_nodenames_list when: mesh_nodes_report.status == 200 rescue: - name: set bitbucket dc cluster available fact ansible.builtin.set_fact: bitbucket_cluster_available: false - name: log a message about bb cluster unavailable ansible.builtin.debug: msg: "Bitbucket DC cluster not currently available."