diff options
author | Stonewall Jackson <stonewall@sacredheartsc.com> | 2023-02-04 01:23:43 -0500 |
---|---|---|
committer | Stonewall Jackson <stonewall@sacredheartsc.com> | 2023-02-04 01:52:13 -0500 |
commit | 0261e875679f1bf63c8d689da7fc7e014597885d (patch) | |
tree | 3f19cd74a0c1070944f75437f30b098d6ef2ffcb /inventory-example/30-constructed.yml | |
download | selfhosted-0261e875679f1bf63c8d689da7fc7e014597885d.tar.gz selfhosted-0261e875679f1bf63c8d689da7fc7e014597885d.zip |
initial commit
Diffstat (limited to 'inventory-example/30-constructed.yml')
-rw-r--r-- | inventory-example/30-constructed.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/inventory-example/30-constructed.yml b/inventory-example/30-constructed.yml new file mode 100644 index 0000000..f519d22 --- /dev/null +++ b/inventory-example/30-constructed.yml @@ -0,0 +1,15 @@ +plugin: constructed +strict: yes +use_vars_plugins: yes +compose: + vlan: vlans.values() | selectattr('cidr', 'contains_ip', ip) | first + ansible_host: ansible_ip | default(ip) | default(ansible_host) + fqdn: inventory_hostname ~ '.' ~ domain + cnames: ([] if cname is not defined else (((cname | split(',')) if cname is string else cname) | map('regex_replace', '$', '.'~domain))) + proxmox_disk: (disk | default('32g') | human_to_bytes / 1073741824) | int + proxmox_memory: (ram | default('4g') | human_to_bytes / 1048576) | int + proxmox_cores: cores | default(2) +groups: + el: (group_names | intersect(['unmanaged','opnsense_firewalls','proxmox_hypervisors']) | length) == 0 + nagios_ansible_managed_clients: (group_names | intersect(['unmanaged','opnsense_firewalls','linux_laptops']) | length) == 0 + nagios_el_clients: (group_names | intersect(['unmanaged','opnsense_firewalls','linux_laptops','proxmox_hypervisors']) | length) == 0 |