ansibleguy / webui

Basic WebUI for using Ansible
https://webui.ansibleguy.net
GNU General Public License v3.0
89 stars 7 forks source link

Problem: Jobs stuck on SSH-Password-Prompt #70

Open NiceRath opened 1 week ago

NiceRath commented 1 week ago

Versions

0.0.24

Scope

Ansible (Job Execution)

Issue

Jobs are stuck on the prompt SSH password: - the other ones work as expected

NiceRath commented 1 week ago

The code looks good: https://github.com/ansibleguy/webui/blob/latest/src/ansibleguy-webui/aw/execute/play_credentials.py#L108

moy804 commented 5 days ago

I'm seeing the same. The jobs are stuck but from the Running command: output there doesn't seem to be a user or credentials passed in:

Capture

superstes commented 4 days ago

Possible issue with the formatting? Needs to be regex? https://github.com/ansible/ansible-runner/issues/534

ansibleguy commented 4 days ago

Yes - looks like it wants regex: https://github.com/ansible/ansible-runner/blob/devel/src/ansible_runner/config/_base.py#L199

ansibleguy commented 4 days ago

Seems it makes no difference if we supply the matches in regex format.. Debugging shows that the ansible-runner actually sends the password, but still nothing happens. At this point in the code the SSH password is sent: https://github.com/ansible/ansible-runner/blob/2.4.0/src/ansible_runner/runner.py#L321

ansibleguy commented 4 days ago

Was able to get it working by forking and hotfixing the ansible-runner: https://github.com/ansibleguy/ansible-runner/blob/release_2.4/src/ansibleguy_runner/runner.py#L323 Will create an issue at the ansible-runner repo.. for now we have a fork that should work: https://pypi.org/project/ansibleguy-runner/

ansibleguy commented 4 days ago

Related: https://github.com/ansibleguy/webui/issues/72

ansibleguy commented 4 days ago

My tests look good. Please update to the new version an re-test it.

moy804 commented 3 days ago

I just tried 0.0.24-2 via docker but it doesn't seem to pass the user or credentials to the ansible-playbook statement: image

Here's the same playbook output on 0.0.23-3: image

ansibleguy commented 2 days ago

Very interesting as the --become-password-file and --connect-password-file are not in the codebase anymore. Can only think of a issue when building the docker images.. Will check it

ansibleguy commented 2 days ago

Have forgot to release the 0.0.24-3 image that has the missing-user fix in it. Currently uploading..

But also on 0.0.24-2 I was not able to reproduce the behavior seen in your screenshot: docker run -d --name ansible-webui --publish 127.0.0.1:8000:8000 --volume $(pwd):/play ansible0guy/webui:0.0.24-2 image

ansibleguy commented 2 days ago

And with 0.0.24-3 in docker now: image

moy804 commented 2 days ago

Looks good to me too. Much appreciated!