Skip to content

ansible_mitogen blacklists third-party modules #1011

@nradchenko

Description

@nradchenko

Hi,

I'd like to use xml module in my playbooks, but lxml python module required for operation is implicitly blacklisted for some unknown reason.

root@0d2e911be079:/etc/ansible# python -V
Python 3.11.4
root@0d2e911be079:/etc/ansible# pip freeze | grep -e ansible -e mitogen
ansible==2.10.7
ansible-base==2.10.17
mitogen==0.3.4
root@0d2e911be079:/etc/ansible# cat test.yml 
- hosts: all
  tasks:
    - xml:
        path: somepath
root@0d2e911be079:/etc/ansible# ansible-playbook test.yml -i localhost, -c local -l all -CD

PLAY [all] **********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [localhost]

TASK [xml] **********************************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: 'lxml' is present in the Mitogen importer blacklist, therefore this context will not attempt to request it from the master, as the request will always be refused.
fatal: [localhost]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "Failed to import the required Python library (lxml) on 0d2e911be079's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}

PLAY RECAP **********************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

root@0d2e911be079:/etc/ansible# 

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-0.3Issues related to 0.3.X Mitogen releasesbugCode feature that hinders desired execution outcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions