-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
debug with_items prints the whole item even if using loop_control label #35493
Comments
Files identified in the description: If these files are inaccurate, please update the |
@valerio-gr The whole item is added to the module result (which is a case for all modules, not just |
@mkrizek, Isn't that a bug? |
@mkrizek, |
testing your playbook with PR above:
|
fixes ansible#35493 updated tests
Would be nice to see this in v2.5 though ;-) Ah I noticed now it is in v2.5 ! |
merged 10mins ago |
i have 2.6.3 and it still shows whole item instead of only one specified variable. maybe i need to specify any additional parameter?
|
@bcoca I still have this problem in 2.7.14. Do i need to add any extra parameter to debug? |
Any update on this, I am also getting same issue with 2.6.5 |
I am also having this issue with 2.6.4. |
ansible 2.7.0 I'm still seeing this huge item output: when running this handler: Not seeing any good method for cleaning this output up and it takes up many lines in stdout, is there a solution that already exists or is that part of this issue? |
@AngryNorseMan I use:
But I think it should, by default, not show all that verbose output. |
Same here and it was driving me bonkers. I couldn't seem to figure out why the deeply nested variable structure was printing above just the value I wanted to see via the Like your example, I'm still using According to #47679, it appears that a custom loop More info here: https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html EDIT: I just realized that much of what I noted here is listed in the OP. I missed that when searching via Google and landing here. |
Adding a note for future visitors, make sure you use debug with msg and not var. |
ISSUE TYPE
Bug Report
COMPONENT NAME
debug module
ANSIBLE VERSION
CONFIGURATION
From ansible-config dump --only-changed:
"""
ANSIBLE_SSH_ARGS = -o ControlPersist=5m
DEFAULT_HASH_BEHAVIOUR = merge
DEFAULT_STDOUT_CALLBACK = skippy
HOST_KEY_CHECKING = False
RETRY_FILES_ENABLED = False
"""
OS / ENVIRONMENT
Redhat 7.3
SUMMARY
This is similar to #32947 but I'm only using loop_contorl/label (and not using loop_var).
The debug module print out on screen the whole content of each item instead of the content of the label var.
STEPS TO REPRODUCE
Save the following playbook to test.yml and run it with the command: ansible-playbook -i localhost, test.yml
EXPECTED RESULTS
Only the name of the server is printed out on screen
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: