Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-navigator ignores $TERM settings #1828

Open
olbohlen opened this issue Jul 29, 2024 · 1 comment
Open

ansible-navigator ignores $TERM settings #1828

olbohlen opened this issue Jul 29, 2024 · 1 comment
Labels
bug Researched, reproducible, committed to fix

Comments

@olbohlen
Copy link

ISSUE TYPE
  • Bug Report
SUMMARY

Running ansible-navigator from a dumb terminal (jenkins, non ttys, or emacs eshell) produces weird output

ANSIBLE-NAVIGATOR VERSION
(1139) heavy:/home/olbohlen$ ansible-navigator --version                      
ansible-navigator 24.3.2
CONFIGURATION

$ cat .ansible-navigator.yaml

ansible-navigator:
color:
enable: true
mode: stdout
editor:
command: /bin/emacsclient
playbook-artifact:
enable: false
execution-environment:
image: registry.redhat.io/ansible-automation-platform-23/ee-supported-rhel8:latest
environment-variables:
set:
PAGER: cat
pull:
policy: missing
logging:
file: /tmp/ansible-navigator.log
append: true
level: debug

LOG FILE

[olbohlen@heavy scratch]$ TERM=dumb ansible-navigator run hello.yaml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the
implicit localhost does not match 'all'
eyJ1dWlkIjogImUwNDRjNWFmLTRjMGYtNDA4NS05NWJmLWFiMmJmYzZkYzY5YiJ9e30=eyJ1dWlkIjogIjQ2ZDIyNzRmLWIxZGEtOTJlYS1kOTE5LTAwMDAwMDAwMDAwMSJ9
PLAY [Sample Play] *************************************************************************
e30=eyJ1dWlkIjogIjQ2ZDIyNzRmLWIxZGEtOTJlYS1kOTE5LTAwMDAwMDAwMDAwOCJ9
TASK [Gathering Facts] *********************************************************************
e30=eyJ1dWlkIjogImQ1N2JhN2IwLTQ1YzgtNDM4NS05OWM1LWVmMWIyZjlkODM5ZCJ9e30=eyJ1dWlkIjogIjZmMjYzZTljLWI2MGMtNGU2OC1hZjg2LTZiYjczNWYyZGU1ZCJ9ok: [localhost]
e30=eyJ1dWlkIjogIjQ2ZDIyNzRmLWIxZGEtOTJlYS1kOTE5LTAwMDAwMDAwMDAwMyJ9
TASK [print a hello message] ***************************************************************
e30=eyJ1dWlkIjogIjllNWUyMmVkLWZiZTktNDJlYy04NGFiLWYyOTI5ODE4Y2IwMSJ9e30=eyJ1dWlkIjogImNhYjNiN2MzLWYxZDItNDRhMC04Njc4LTViYTNkZGNhYjhhYSJ9ok: [localhost] => {
"msg": "Hello World!"
}
e30=eyJ1dWlkIjogIjVlNDRhMDM0LThkY2ItNDE0Yi04YWMwLTVmNDgxZmEyNjMyNSJ9
PLAY RECAP *********************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

e30=

STEPS TO REPRODUCE

Run ansible-navigator in a Terminal that does not support ANSI control characters like the emacs eshell.

EXPECTED RESULTS

Setting TERM=dumb should ensure that the command just prints clean ASCII without control-characters, as the terminal is "dumb"...

ACTUAL RESULTS

As` you can see above, you get fancy control chars in the output.

ADDITIONAL INFORMATION
@olbohlen olbohlen added bug Researched, reproducible, committed to fix new New issues and PRs to triaged labels Jul 29, 2024
@olbohlen
Copy link
Author

olbohlen commented Jul 29, 2024

This relates a bit to #1736

@shatakshiiii shatakshiiii removed the new New issues and PRs to triaged label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Researched, reproducible, committed to fix
Projects
Status: No status
Development

No branches or pull requests

2 participants