summaryrefslogtreecommitdiffstats
path: root/ansible/deployment_poc/tasks/netbox_query_cluster.yml
blob: 61fbc16ac13d1e887c69b3c4c87344a0762c7a09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
- name: Locate cluster hosts
  ansible.builtin.uri:
    url: "{{ endpoint }}/dcim/devices/?cluster_id={{ nb_vm.json.results[0].cluster.id }}"
    client_cert: "{{ cert }}"
    client_key: "{{ key }}"
    method: GET
    return_content: yes
    headers:
      Accept: application/json
      Authorization: "Token {{ token }}"
  register: nb_hosts
  delegate_to: localhost
  tags:
    - init_dp
    - init_ssh