16 lines
430 B
YAML
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"
|
||
|
|