16 lines
451 B
YAML
16 lines
451 B
YAML
|
---
|
||
|
# consider ditching this block, would need to work around missing cluster ID in hostvars
|
||
|
- name: Query VM
|
||
|
ansible.builtin.uri:
|
||
|
url: "{{ endpoint }}/virtualization/virtual-machines/?name={{ inventory_hostname }}"
|
||
|
client_cert: "{{ cert }}"
|
||
|
client_key: "{{ key }}"
|
||
|
method: GET
|
||
|
return_content: yes
|
||
|
headers:
|
||
|
Accept: application/json
|
||
|
Authorization: "Token {{ token }}"
|
||
|
register: nb_vm
|
||
|
delegate_to: localhost
|
||
|
|