aws-samples / aws-samples/workspaces-with-ansible

Does not work with Ansible 2.14

Open
#1 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Running RHEL 9.2, Ansible 2.14, with Python 3.6, all stock and patched to latest.

The .py file, even after being set +x is not executed by ansible.

I get the following error in multiple runtime environments:

[WARNING]: * Failed to parse temp/workspaces_inventory_provider.py with script plugin:
Inventory script (temp/workspaces_inventory_provider.py) had an execution error:
File "/usr/lib/python3.9/site-packages/ansible/inventory/manager.py", line 293, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "/usr/lib/python3.9/site-packages/ansible/plugins/inventory/script.py", line 150, in parse
raise AnsibleParserError(to_native(e))

This happens with ansible-inventory, ansible, and ansible-playbook.

Running the .py file directly works fine, I see the returned JSON.

It does not support a --host switch. This is one of the documented requirements of an Ansible inventory script.

Ansible is unable to identify that this script can be used to generate inventory content.

I think there are some missing components in this script to make it fully functional as a dynamic inventory source.

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.