gentle-sugar-52379
10/03/2022, 7:10 AMdeployments/project_name/main.py
script and made it invokable with python_source
. i'm able to run it with ./pants run deployments/project_name
with and without the sandboxing feature. pretty nice
but ansible-runner wants to call ansible-playbook
via subprocess. i tried to include it as a requirement in my python_source
but without any luck.
the next try was: make a fake ansible-playbook
executable inside my ~/.local/bin folder
. result: my deployments/project_name/main.py
is able to find and execute it.
is it the right solution to globally install ansible so it's findable by my deployments/project_name/main.py
script or is there something i could do to include it into the path to be able to rely on the automatic fetching of ansible?enough-analyst-54434
10/03/2022, 7:15 AMpex_binary
target to run this with exexution_mode="venv"
(https://www.pantsbuild.org/docs/reference-pex_binary#codeexecution_modecode) that should work. The venv execution mode puts all dependency console scripts on the PATH
.gentle-sugar-52379
10/03/2022, 7:19 AMenough-analyst-54434
10/03/2022, 7:21 AM./pants package
against the pex_binary
venv mode target and then run the PEX file that creates as a second step. The run
goal has changed a bit recently and I don't have a good grasp of what it does in which version of Pants currently.gentle-sugar-52379
10/03/2022, 7:26 AMrun
goal.
if i give it a name the pex_binary gets executed.
cool, thx a lot 🙂bitter-ability-32190
10/03/2022, 1:06 PMgentle-sugar-52379
10/04/2022, 4:11 AMbitter-ability-32190
10/04/2022, 12:29 PMmain.py
or running the binary target by name.