Im trying to create an execution environment to run a particular ansible collection but failing to do so. The collection is this Forcepoint collection. As you can see, it has a nonstandard way of installing all the modules and i cannot get it to work in an execution environment for the life of me (yes, skill issue, I know…).
It’s not finding the modules, the common “couldn’t resolve module/action”. If I would have to guess why it is not working, it’s because for some reason the EE does not find the collection after installing it with the python script.
If i follow the installation instructions and install the collection to a test virtual machine with clean ansible installation, it works with the playbook im testing it with, so the module name is correct.
I wasn’t able to get an image to build using the contents you shared, but these few tweaks did make one successfully. Do you have any test-code that you could share that we can run against it?
- name: Obtain facts about Network Elements
hosts: localhost
gather_facts: no
tasks:
- name: Retrieve all Group level objects, limit of 50
network_element_facts:
element: group
limit: 50
It should fail at connecting, since no api keys are provided. Im assuming that you do not have a spare forcepoint firewall lying around in your house
But it should not throw errors about missing module if your EE build worked.
I managed to solve the issue with some AI assistance. Asked ChatGPT to walk me trough the install.py file line by line in detail.
Turns out that the install.py script does not copy the modules located in the library-folder to the default modules path. I just set /etc/ansible/ansible.cfg to: