-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Fails check --list-hosts when hosts get value with a variable #75354
Comments
Files identified in the description:
If these files are incorrect, please update the |
can you provide a full reproducer (the source of ping_pong.yml for example)? needs_info |
Thanks for answering. Here:
|
|
okay, instead var_prompt better extra var? for now? Can ansible evaluates --list-hosts after launch the var_prompt? to future, I mean. regard. |
The behavior is probably not going to change, but the fact that we're displaying a Traceback instead of an error message is probably a bug... |
probably not, but keeping the ticket open to return a meaningful error, the current stacktrace is not acceptable |
fixes ansible#75354 (cherry picked from commit ff72908)
Summary
When I trie to check hosts into playbook (flag --list-hosts), trigger a error. This playbook get the next line: host: "{{ myvar_hosts }}"
Issue Type
Bug Report
Component Name
ansible-playbook --list-hosts
Ansible Version
Configuration
OS / Environment
RHEL 7.9
Steps to Reproduce
ansible-playbook ping_pong.yml -i ../inventario.ini --list-hosts -vvv
Expected Results
I expected a promt for input inventory value and then show hosts or hosts-groups involve from the inventory file.
for example:
After input value in var_promt (inventory)
Show:
playbook: ping_pong.yml
play #1 (localhost): Ping Pong TAGS: []
pattern: [u'localhost']
hosts (1):
localhost
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: