47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
---
|
|
- name: Check Available Inventory Plugins
|
|
hosts: localhost
|
|
gather_facts: false
|
|
tasks:
|
|
- name: List all available inventory plugins
|
|
ansible.builtin.shell: |
|
|
echo "=== All inventory plugins ==="
|
|
ansible-doc -t inventory -l 2>/dev/null || echo "ansible-doc failed"
|
|
echo ""
|
|
echo "=== Check linode specific plugins ==="
|
|
ansible-doc -t inventory -l 2>/dev/null | grep -i linode || echo "No linode plugins in doc list"
|
|
echo ""
|
|
echo "=== Check plugin files directly ==="
|
|
find /runner/requirements_collections -name "*.py" -path "*/inventory/*" | grep -i linode || echo "No linode inventory plugins found in files"
|
|
echo ""
|
|
echo "=== Collection structure ==="
|
|
ls -la /runner/requirements_collections/ansible_collections/linode/cloud/plugins/inventory/ 2>/dev/null || echo "Linode inventory directory not found"
|
|
register: plugin_check
|
|
ignore_errors: true
|
|
|
|
- name: Display plugin check results
|
|
ansible.builtin.debug:
|
|
var: plugin_check.stdout_lines
|
|
|
|
- name: Test inventory plugin directly
|
|
ansible.builtin.shell: |
|
|
echo "=== Test plugin path ==="
|
|
export ANSIBLE_COLLECTIONS_PATH="/runner/requirements_collections:/usr/share/ansible/collections"
|
|
ansible-inventory --list -i /dev/stdin << 'EOF'
|
|
plugin: linode.cloud.inventory
|
|
access_token: "fake_token_for_test"
|
|
EOF
|
|
register: plugin_test
|
|
ignore_errors: true
|
|
environment:
|
|
LINODE_API_TOKEN: "test"
|
|
|
|
- name: Display plugin test results
|
|
ansible.builtin.debug:
|
|
msg: |
|
|
Plugin test output:
|
|
{{ plugin_test.stdout }}
|
|
|
|
Plugin test error:
|
|
{{ plugin_test.stderr }}
|