system/ansible/deployment_poc/tasks/netbox_query_ip.yml

15 lines
365 B
YAML
Raw Normal View History

---
- name: Query available address
ansible.builtin.uri:
url: "{{ endpoint }}/ipam/prefixes/{{ prefix_id }}/available-ips/?limit=1"
client_cert: "{{ cert }}"
client_key: "{{ key }}"
method: GET
return_content: yes
headers:
Accept: application/json
Authorization: "Token {{ token }}"
register: nb_ip
delegate_to: localhost