From 4ad8da93cd41a85138531f86730de36893c2b01d Mon Sep 17 00:00:00 2001 From: Kevin Thompson Date: Thu, 7 Aug 2025 14:17:17 -0500 Subject: [PATCH] Update playbook to reference proper variables --- playbooks/inventory/linode.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/playbooks/inventory/linode.yaml b/playbooks/inventory/linode.yaml index c9c1883..6bb830d 100644 --- a/playbooks/inventory/linode.yaml +++ b/playbooks/inventory/linode.yaml @@ -51,24 +51,26 @@ msg: | Inventory update complete! - ✅ Inventory file created: /runner/project/inventory/linode_hosts.json - ✅ Changes committed to Git: {{ 'Yes' if git_commit_result.rc == 0 else 'Failed - check logs' }} + ✅ Inventory file created: inventory/linode_hosts.json + ✅ Changes committed to Git: {{ 'Yes' if git_commit_result is defined and git_commit_result.rc == 0 else 'Check logs for details' }} ✅ Repository: git@git.ewnix.net:phlux/ewnix-automation.git Next steps: - 1. {% if not awx_api_integration %}Manually sync your AWX project to pull the latest inventory{% else %}Project sync triggered automatically{% endif %} + 1. {% if not (awx_api_integration | default(false)) %}Manually sync your AWX project to pull the latest inventory{% else %}Project sync triggered automatically{% endif %} 2. Create a new inventory source in AWX: - Source: "Sourced from a Project" - Inventory File: "inventory/linode_hosts.json" - No credential needed (it's a static file) 3. Sync the inventory source to import your Linode hosts - Your {{ linode_inventory_data._meta.hostvars | length }} Linode hosts will be available in groups: + Your Linode hosts will be available in groups: - tag_k3s (k3s cluster nodes) - - tag_control_plane ({{ hostvars[groups['localhost'][0]]['linode_inventory_data']._meta.hostvars | selectattr('is_control_plane', 'equalto', true) | list | length }} control plane nodes) - - tag_worker_node ({{ hostvars[groups['localhost'][0]]['linode_inventory_data']._meta.hostvars | selectattr('is_worker_node', 'equalto', true) | list | length }} worker nodes) + - tag_control_plane (control plane nodes) + - tag_worker_node (worker nodes) - region_us_southeast (regional grouping) - type_* (by instance type) + + Check the role output above for the exact number of hosts discovered and their details. # Optional: Run against discovered Linode hosts - name: Debug and use discovered Linode hosts