Add netbox role

Kinda ouroborosish if you think about it. Better don’t.
This commit is contained in:
Timotej Lazar 2024-05-28 12:32:28 +02:00
parent 43b9010126
commit c7a3513fa1
14 changed files with 379 additions and 0 deletions

View file

@ -11,3 +11,8 @@
cluster: '{{ query("netbox.netbox.nb_lookup", "clusters", raw_data=true, api_filter="name="+cluster) | first }}'
nodes: '{{ groups["cluster_"+cluster] | map("extract", hostvars) | rejectattr("is_virtual") }}'
when: cluster
- name: Get my domain names if any
set_fact:
fqdns: '{{ interfaces | map(attribute="ip_addresses") | flatten
| map(attribute="dns_name") | reject("==", "") | sort | unique }}'