Reattempting Linode dynamic inventories.

This commit is contained in:
Kevin Thompson
2025-08-07 12:47:06 -05:00
parent 9e07592c4d
commit 1b3bdeb740
9 changed files with 430 additions and 55 deletions

View File

@@ -0,0 +1,22 @@
# Generated Linode Inventory
# Generated on: {{ ansible_date_time.iso8601 }}
{% for host_name, host_vars in linode_inventory_data._meta.hostvars.items() %}
{{ host_name }} ansible_host={{ host_vars.ansible_host }} linode_id={{ host_vars.linode_id }} linode_region={{ host_vars.linode_region }} linode_type={{ host_vars.linode_type }} linode_status={{ host_vars.linode_status }}
{% endfor %}
{% for group_name, group_data in linode_inventory_data.items() %}
{% if group_name != '_meta' and group_name != 'all' %}
[{{ group_name }}]
{% if group_data.hosts is defined %}
{% for host in group_data.hosts %}
{{ host }}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
[all:vars]
ansible_user=root
ansible_ssh_common_args='-o StrictHostKeyChecking=no'