ansible-navigator
ansible-navigator copied to clipboard
ansible-navigator run can't use --ask-pass option
ISSUE TYPE
- Bug Report
SUMMARY
~ $ ansible-navigator run ping.yml -i hosts --ask-pass --mode stdout
^CTerminated
ANSIBLE-NAVIGATOR VERSION
~ $ ansible-navigator --version
ansible-navigator 1.1.0
CONFIGURATION
~ $ pwd
/home/podman
~ $ ls ansible-navigator.yaml
ls: ansible-navigator.yaml: No such file or directory
LOG FILE
~ $ ansible-navigator run --help-playbook --mode stdout
-k, --ask-pass ask for connection password
~ $ ansible-navigator run ping.yml -i hosts --ask-pass -vvv --mode stdout
ansible-playbook [core 2.11.3.post0]
config file = None
configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible-playbook
python version = 3.8.6 (default, Jan 29 2021, 17:38:16) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
jinja version = 2.10.3
libyaml = True
No config file found; using defaults
!! STOP !!
~ $ cat ansible-navigator.log
220321060709.190 WARNING 'ansible_navigator.run' Dirty exit, killing the pid
STEPS TO REPRODUCE
I use --ask-pass option for "ansible-navigator run" command
EXPECTED RESULTS
I look "SSH password: " prompt. I can input ssh password.
ACTUAL RESULTS
I didn't look "SSH password: " prompt. I can't input ssh password.
ADDITIONAL INFORMATION
Dockerfile about create container image for use ansible-nabigator
FROM alpine:edge
RUN echo -e "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk --no-cache add podman tzdata fuse-overlayfs && \
apk --no-cache add gcc musl-dev libffi-dev oniguruma-dev && \
apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/v3.11/main/ python3~=3.8 python3-dev && \
pip3 install --upgrade pip && \
pip3 install wheel && \
pip3 install ansible-navigator && \
echo -e "[storage]\n driver = \"overlay\"\n [storage.options]\n mount_program = \"/usr/bin/fuse-overlayfs\"" > /etc/containers/storage.conf && \
echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" > /etc/containers/registries.conf && \
adduser --disabled-password podman && \
echo "podman:100000:65536" >> /etc/subuid && \
echo "podman:100000:65536" >> /etc/subgid
USER podman
WORKDIR /home/podman
RUN pip3 install ansible-navigator --user && \
echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.profile && \
source ~/.profile
We have marked this as feature request to automatically detect user is expecting user prompt and disable playbook-artifact creation in stdout mode.
For now as a work around please follow the steps here https://ansible-navigator.readthedocs.io/en/latest/faq/#why-does-the-playbook-hang-when-vars-prompt-or-pause-prompt-is-used to disable the playbook-artifact creation.
As for me, it's still the same as this issue. I am using ansible-navigator 24.2.0 with docker. However, everything works if I use ansible all -m command -a "id" --ask-become-pass but not with ansible-navigator run update.yml --ask-become-pass -m stdout. Surprisingly, it works with ansible-navigator run update.yml --become-password-file=secret -m stdout too.
I am using Ansible Core 2.16.4.