Couldn't resolve module/action 'ini_file'. This often indicates a misspelling, missing collection, or incorrect module path

Problem:
We have made a ansible playbook and wish to run it. However it seems to throw the following error:
couldn’t resolve module/action ‘ini_file’. This often indicates a misspelling, missing collection, or incorrect module path.

Now i did install through ansible-galaxy the community general but it still wouldn’t detect it, even changing the ini_file: to community.general.ini_file: but that also gives the same error.

Where and how can i install the module to support ini_file for foreman-katello?

Expected outcome:
The playbook doesn’t throw the error and starts to go though the playbook.

Foreman and Proxy versions:
latest

Foreman and Proxy plugin versions:
latest

Distribution and version:
RHEL 8.

Other relevant data:
I’m not sure if it’s possible, but can this be done through a repository and installing an rpm file or package?

So i found the solution :slight_smile: i used this:
ansible-galaxy collection install -p /usr/share/ansible/collections/ansible_collections/ community.general

found out that the default directory is incorrect so i had to specify it specifically.
ansible-galaxy collection list showed what was actually going on.

I do wonder if it’s possible to install this with rpm still

Hi Macley,
I am currently running into the same exact issue as you described. I ran the install " ansible-galaxy collection install -p /usr/share/ansible/collections/ansible_collections/ community.general" but with no luck.
Is there anything/steps you followed after that?
Thanks