Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use console_scripts and module entry points #39253
Allow calling ansible using
This would still only allow execution of the adhoc CLI correct? It would not allow for executing a playbook via
Additionally this would make us more dependent on setuptools, which I don't think we want.
Based on previous discussions, I believe the bin scripts would still need to exist, and import and call the code from
As it is, this also breaks running ansible from source due to the reliance on setuptools.
yeah, -1 to this implementation. We should continue to have scripts but they should be light wrappers. of things in cli. (The goal should be to minimize use of setuptools, especially at runtime.)
I think that to start with, we should only enable python -m ansible.cli.SOMETHING to work. That way people can access any of the command line scripts via python -m. At some point in the future we can implement ansible/main.py to map to either ad hoc or playbook... but right now it isn't apparent to me which one of those we should choose.
Ok, if we want to be able to run ansible from source without installing the package, keeping minimal wrapper scripts should be needed. I personally do not see the point for keeping them, especially as the installer would be able to create more flexible scripts.
Still, I will follow your instructions and update the PR to keep the files and only to enable the entry points (without duplicating implementation).
CI failure in sanity tests: https://app.shippable.com/github/ansible/ansible/runs/62511/1/tests
CI failure in integration tests due to ansible* executables not being in the path: