On 03.12.2017 23:49, area0 wrote:
> Thanks Kai. The output is working fine, it's more about the formatting.
> For
> example, with the following debug code, i receive the following;
Ansible is not a reporting tool so it has limit supported for nice
output on the screen.
You can put it in a file with the template module.
> - debug:
> msg: "{{ inventory_hostname }} has {{
> available_updates.found_update_count }} updates available.
> {% for key, value in
> available_updates.updates.iteritems() %}
> - KB: {{ value.title }}
> {% endfor %}"
The first ting to do is losing the quotes and add a pipe, the pipe is
essential.
To get an other output than the default one, you'll need to change the
stdout callback plugin[1].
If you use the debug, it output nice human readable text that you are
looking for, but it will be more verbose.
You could check out and test the other to see if them give you the
output you want or you could write your own.
[1]
https://docs.ansible.com/ansible/devel/plugins/callback.html#plugin-list
--
Kai Stian Olstad