Files
ewnix-automation/playbooks/inventory/debug_collections.yml

34 lines
1.1 KiB
YAML

---
- name: Debug Collections in Execution Environment
hosts: localhost
gather_facts: false
tasks:
- name: Check installed collections
ansible.builtin.shell: |
echo "=== Ansible Collections Info ==="
ansible-galaxy collection list
echo ""
echo "=== Specific Linode Collection Check ==="
ansible-galaxy collection list | grep -i linode || echo "No Linode collections found"
echo ""
echo "=== Collection Paths ==="
python3 -c "
import ansible.plugins.inventory
print('Inventory plugin paths:', ansible.plugins.inventory.__path__)
"
echo ""
echo "=== Try to import linode.cloud ==="
python3 -c "
try:
from ansible_collections.linode.cloud.plugins.inventory.inventory import InventoryModule
print('linode.cloud.inventory plugin found!')
except ImportError as e:
print(f'Import error: {e}')
"
register: collection_debug
ignore_errors: true
- name: Display collection debug info
ansible.builtin.debug:
var: collection_debug.stdout_lines