system/ansible/deployment_poc/tasks/netbox_query_interface.yml
Georg Pfuetzenreuter 642290c734 Bulk update
Signed-off-by: Georg Pfuetzenreuter <georg@lysergic.dev>
2022-02-13 01:41:30 +01:00

16 lines
430 B
YAML

---
- name: Query existing interface
ansible.builtin.uri:
url: "{{ endpoint }}/virtualization/interfaces/?name=eth0&virtual_machine_id={{ id }}"
client_cert: "{{ cert }}"
client_key: "{{ key }}"
method: GET
return_content: yes
headers:
Accept: application/json
Authorization: "Token {{ token }}"
register: nb_interface_2
delegate_to: localhost
when: "nb_interface_1.status|int == 400"