You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot run any task due to the error: ModuleNotFoundError: No module named 'ansible.errors'
I found Issue #18 but that is not solving my problems.
I use localhost as executioner, that did not work
Also using connection: local that also did not work
Firewall as FQDN or IP number, the same error
I have httpx installed
When using curl to list aliases I get the proper output.
Used the downloaded apikey.txt and even used the api_key and api_secret
ansibleguy
changed the title
[Support] - ModuleNotFoundError: No module named 'ansible.errors' ebem when using localhost and/or connection:local
[Support] - No module named 'ansible.errors'
Jul 25, 2023
I think this happens if the execution environment can not load the Ansible core modules. (the same behavior as if the modules were run on a remote host; only 'ansible.module_utils.*' are available)
This might explain why it does not happen to everyone.
Therefor I added a 'catch' for the only 'core-import'.
Thanks
ansibleguy
changed the title
[Support] - No module named 'ansible.errors'
[General] - No module named 'ansible.errors'
Jul 25, 2023
Tasks
Please make sure to go through these steps before opening an issue:
[ ✅] Read the documentation of the affected module: Docs
[ ✅] Read the troubleshooting info: Info
Basic info
Versions
Controller
[ ✅] Collection version: 1.2.3
(
ansible-galaxy collection list | grep opnsense
)[:white_check_mark: ] Ansible & Python version:
ansible [core 2.15.0]
config file = /home/mhulsman/ansible/project/opnsense/ansible.cfg
configured module search path = ['/home/mhulsman/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.11/site-packages/ansible
ansible collection location = /home/mhulsman/ansible/project/opnsense/collections
executable location = /usr/bin/ansible
python version = 3.11.4 (main, Jun 30 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/bin/python3.11)
jinja version = 3.1.2
libyaml = True
(
ansible --version
)OPNSense
[:white_check_mark: ] System version: 23.1
Plugin version:
(if applicable)
Describe the bug
Cannot run any task due to the error: ModuleNotFoundError: No module named 'ansible.errors'
I found Issue #18 but that is not solving my problems.
I use localhost as executioner, that did not work
Also using connection: local that also did not work
Firewall as FQDN or IP number, the same error
I have httpx installed
When using curl to list aliases I get the proper output.
Used the downloaded apikey.txt and even used the api_key and api_secret
Expected behavior
working modules
Debug output
Set the debug option and copy its output.
If the issue is related to time-consumption, you may also add the content of the profiling logs.
Screenshots
Additional context
Reproduce
Tasks
Task(s) that produce the error:
Config
Config used for the task(s):
OPNSense config
(If the issue only occurs when non ansible-managed config is modified)
The text was updated successfully, but these errors were encountered: