{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/5564","labels_url":"https://api.github.com/repos/ansible/ansible/issues/5564/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/5564/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/5564/events","html_url":"https://github.com/ansible/ansible/issues/5564","id":25363329,"number":5564,"title":"Verbose output from ansible-playbook when using list of hashed variables","user":{"login":"greenbrian","id":527832,"avatar_url":"https://avatars.githubusercontent.com/u/527832?v=3","gravatar_id":"","url":"https://api.github.com/users/greenbrian","html_url":"https://github.com/greenbrian","followers_url":"https://api.github.com/users/greenbrian/followers","following_url":"https://api.github.com/users/greenbrian/following{/other_user}","gists_url":"https://api.github.com/users/greenbrian/gists{/gist_id}","starred_url":"https://api.github.com/users/greenbrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenbrian/subscriptions","organizations_url":"https://api.github.com/users/greenbrian/orgs","repos_url":"https://api.github.com/users/greenbrian/repos","events_url":"https://api.github.com/users/greenbrian/events{/privacy}","received_events_url":"https://api.github.com/users/greenbrian/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P5","name":"P5","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-01-09T23:04:42Z","updated_at":"2015-06-12T20:42:03Z","closed_at":null,"body":"When a list of hashes are used as variables, ansible-playbook output is very verbose, printing out the full hash contents.  My working playbooks have longer variable files, so the terminal is constantly filled with useless information.\r\n\r\nAlso, when used with debug, the output is full item results are printed to stdout. I'd like to have very short output of tasks using 'debug: var=' for administrators to easily see output of tasks (ie process_status=running/stopped, deployed software versions).\r\n\r\n```\r\n---\r\n\r\n- hosts: localhost\r\n  vars:\r\n    myapp:\r\n      - name: app1\r\n        somesetting: nope\r\n        othersetting: yep\r\n        dontyouhatepants: yep\r\n      - name: app2\r\n        somesetting: yep\r\n        othersetting: yep\r\n        dontyouhatepants: nope\r\n  tasks:\r\n  - name: just an echo\r\n    shell: /bin/echo \"{{ item.name }}\"\r\n    with_items: myapp\r\n    register: echo\r\n  - debug: var=item.stdout\r\n    with_items: echo.results\r\n\r\n\r\n\r\n$ ansible-playbook -i inv/TEST test.yml\r\n\r\nPLAY [localhost] **************************************************************\r\n\r\nGATHERING FACTS ***************************************************************\r\nok: [localhost]\r\n\r\nTASK: [just an echo] **********************************************************\r\nchanged: [localhost] => (item={'dontyouhatepants': 'yep', 'name': 'app1', 'othersetting': 'yep', 'somesetting': 'nope'})\r\nchanged: [localhost] => (item={'dontyouhatepants': 'nope', 'name': 'app2', 'othersetting': 'yep', 'somesetting': 'yep'})\r\n\r\nTASK: [debug var=item.stdout] *************************************************\r\nok: [localhost] => (item={'item': {'dontyouhatepants': 'yep', 'name': 'app1', 'othersetting': 'yep', 'somesetting': 'nope'}, u'delta': u'0:00:00.002124', u'cmd': u'/bin/echo \"app1\" ', u'end': u'2014-01-09 16:41:02.251091', u'stderr': u'', u'stdout': u'app1', 'invocation': {'module_name': 'shell', 'module_args': u'/bin/echo \"app1\"'}, u'changed': True, u'rc': 0, u'start': u'2014-01-09 16:41:02.248967'}) => {\r\n    \"item\": {\r\n        \"changed\": true,\r\n        \"cmd\": \"/bin/echo \\\"app1\\\" \",\r\n        \"delta\": \"0:00:00.002124\",\r\n        \"end\": \"2014-01-09 16:41:02.251091\",\r\n        \"invocation\": {\r\n            \"module_args\": \"/bin/echo \\\"app1\\\"\",\r\n            \"module_name\": \"shell\"\r\n        },\r\n        \"item\": {\r\n            \"dontyouhatepants\": \"yep\",\r\n            \"name\": \"app1\",\r\n            \"othersetting\": \"yep\",\r\n            \"somesetting\": \"nope\"\r\n        },\r\n        \"rc\": 0,\r\n        \"start\": \"2014-01-09 16:41:02.248967\",\r\n        \"stderr\": \"\",\r\n        \"stdout\": \"app1\"\r\n    },\r\n    \"item.stdout\": \"app1\"\r\n}\r\nok: [localhost] => (item={'item': {'dontyouhatepants': 'nope', 'name': 'app2', 'othersetting': 'yep', 'somesetting': 'yep'}, u'delta': u'0:00:00.002419', u'cmd': u'/bin/echo \"app2\" ', u'end': u'2014-01-09 16:41:02.308687', u'stderr': u'', u'stdout': u'app2', 'invocation': {'module_name': 'shell', 'module_args': u'/bin/echo \"app2\"'}, u'changed': True, u'rc': 0, u'start': u'2014-01-09 16:41:02.306268'}) => {\r\n    \"item\": {\r\n        \"changed\": true,\r\n        \"cmd\": \"/bin/echo \\\"app2\\\" \",\r\n        \"delta\": \"0:00:00.002419\",\r\n        \"end\": \"2014-01-09 16:41:02.308687\",\r\n        \"invocation\": {\r\n            \"module_args\": \"/bin/echo \\\"app2\\\"\",\r\n            \"module_name\": \"shell\"\r\n        },\r\n        \"item\": {\r\n            \"dontyouhatepants\": \"nope\",\r\n            \"name\": \"app2\",\r\n            \"othersetting\": \"yep\",\r\n            \"somesetting\": \"yep\"\r\n        },\r\n        \"rc\": 0,\r\n        \"start\": \"2014-01-09 16:41:02.306268\",\r\n        \"stderr\": \"\",\r\n        \"stdout\": \"app2\"\r\n    },\r\n    \"item.stdout\": \"app2\"\r\n}\r\n\r\nPLAY RECAP ********************************************************************\r\nlocalhost                  : ok=3    changed=1    unreachable=0    failed=0\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/111608450","html_url":"https://github.com/ansible/ansible/issues/5564#issuecomment-111608450","issue_url":"https://api.github.com/repos/ansible/ansible/issues/5564","id":111608450,"user":{"login":"droopy4096","id":1248187,"avatar_url":"https://avatars.githubusercontent.com/u/1248187?v=3","gravatar_id":"","url":"https://api.github.com/users/droopy4096","html_url":"https://github.com/droopy4096","followers_url":"https://api.github.com/users/droopy4096/followers","following_url":"https://api.github.com/users/droopy4096/following{/other_user}","gists_url":"https://api.github.com/users/droopy4096/gists{/gist_id}","starred_url":"https://api.github.com/users/droopy4096/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droopy4096/subscriptions","organizations_url":"https://api.github.com/users/droopy4096/orgs","repos_url":"https://api.github.com/users/droopy4096/repos","events_url":"https://api.github.com/users/droopy4096/events{/privacy}","received_events_url":"https://api.github.com/users/droopy4096/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T20:42:03Z","updated_at":"2015-06-12T20:42:03Z","body":"didn't realize that would take care of hash iteration output, but it did. great!"}}