Update playbook to reference proper variables
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user