pyinstaller can't pick up Ansible plug-ins

PyInstaller is a program that goes through your Python code and finds all the dependencies and creates a folder or file that you can distribute. This file can be run on other computers without the need to install anything.

My program runs on Ubuntu. It calls Ansible-playbook

I think my problem is that PyInstaller misses Ansible plug-ins because they get hooked up by Python code instead of imports. When I transfer my PyInstaller generated application to another computer and run it, I get:

File “”, line 555, in runUpdate
File “/home/dfr/projects/m9kupdate/py/build/top/out00-PYZ.pyz/ansible.inventory”, line 141, in init
File “/home/dfr/projects/m9kupdate/py/build/top/out00-PYZ.pyz/ansible.utils.plugins”, line 186, in all
File “/home/dfr/projects/m9kupdate/py/build/top/out00-PYZ.pyz/ansible.utils.plugins”, line 123, in _get_paths
File “/home/dfr/projects/m9kupdate/py/build/top/out00-PYZ.pyz/ansible.utils.plugins”, line 85, in _get_package_paths
ImportError: No module named vars_plugins

Has anyone been through this? Can some of you more experienced people give me a hint of what to do? You can specify to PyInstaller the name of files that it misses, for example:

pyinstaller.py –hidden-import=callbackModule.py top.py

Thanks,
Todd

The way that remote modules is installed works this way - you can still get tab completion, but the remote transfer parts are a bit black magic.

I think if anything you may need to be explicit with this program to make it pull in everything, though in general I’ll say it’s not supported if you’re installing outside of pip, package managers, or the source instructions on docs.ansible.com.