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
Without sudo, the command resolves to/opt/pipx_bin/ansible-playbook .... With sudo, we get /usr/bin/sudo ansible-playbook ..., which results in the error.
I'm guessing that its losing the PATH - Perhaps sudo --preserve-env would fix this?
Running in a GitHub Action workflow directly, this is also the case. I have to run sudo $(which ansible-playbook) to resolve the command path currently.
The text was updated successfully, but these errors were encountered:
m-roberts
changed the title
Running with sudo doesn't worksudo: ansible-playbook: command not foundJul 19, 2021
Without
sudo
, the command resolves to/opt/pipx_bin/ansible-playbook ...
. Withsudo
, we get/usr/bin/sudo ansible-playbook ...
, which results in the error.I'm guessing that its losing the PATH - Perhaps
sudo --preserve-env
would fix this?Running in a GitHub Action workflow directly, this is also the case. I have to run
sudo $(which ansible-playbook)
to resolve the command path currently.The text was updated successfully, but these errors were encountered: