Goodday, I am new to Ansible AP and trying to work on a project, but having a hard time as I can not seem to find the info I need easily.
The issue I currently face, is I need a dynamic inventory using the FreeIPA contributed plugin. So I see there’s an old script in contrib as a new plugin
contrib-scripts/inventory/freeipa.py at main · ansible-community/contrib-scripts · GitHub
ansible/contrib/inventory/freeipa.py at stable-2.9 · ansible/ansible · GitHub
I create a dynamic inventory (sourced from project, a git where I have the following folder and file):
inventories/clients_and_controllers.yml, where the contabnts of the .yml is a single line:
plugin: freeipa
also tried:
plugin: community.general.freeipa
Once I sync this plugin source, I get below error message. What am I missing?
I am not an admin in Ansible AP. Do I need to install a collection, the contrib plugins? I do not know how and cannot find any documentation on this either.
EDIT:
This is what I have in collections/requirements.yml
---
collections:
- name: freeipa.ansible_freeipa
- name: community.general
ansible-inventory [core 2.15.6]
1
config file = None
2
configured module search path = [‘/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
3
ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
4
ansible collection location = /runner/requirements_collections:/root/.ansible/collections:/usr/share/ansible/collections:/usr/share/automation-controller/collections
5
executable location = /usr/local/bin/ansible-inventory
6
python version = 3.9.18 (main, Sep 7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/bin/python3)
7
jinja version = 3.1.2
8
libyaml = True
9
No config file found; using defaults
10
host_list declined parsing /runner/project/inventories/clients_and_controllers.yml as it did not pass its verify_file() method
11
script declined parsing /runner/project/inventories/clients_and_controllers.yml as it did not pass its verify_file() method
12
toml declined parsing /runner/project/inventories/clients_and_controllers.yml as it did not pass its verify_file() method
13
[WARNING]: * Failed to parse
14
/runner/project/inventories/clients_and_controllers.yml with auto plugin:
15
inventory config ‘/runner/project/inventories/clients_and_controllers.yml’
16
specifies unknown plugin ‘freeipa.py’
17
File “/usr/local/lib/python3.9/site-packages/ansible/inventory/manager.py”, line 293, in parse_source
18
plugin.parse(self._inventory, self._loader, source, cache=cache)
19
File “/usr/local/lib/python3.9/site-packages/ansible/plugins/inventory/auto.py”, line 53, in parse
TIA, slekkus