On 03.12.2017 11:49, area0 wrote:
Any way we can format the output of the debug message as below i.e. have a
KB per line?

" host1 has 12 updates available. The following updates are available for
install:
 - KB11222
 - KB112232
  etc"

It should based on your output of the available_updates.
What are you seen and do you have the output of the variable that does not give you that output?

If the "kb": field contains more than one element, my code will put them in a comma separated sting. If that is what you see, and just want all to be in one list this should fix it.

  - debug:
      msg: |
{{ inventory_hostname }} has {{ available_updates.found_update_count }} updates available. The following updates are available for install:
        {% for key, value in available_updates.updates.iteritems() %}
        {% for i in value.kb %}
        - {{ i }}
        {% endfor %}
        {% endfor %}


--
Kai Stian Olstad

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/24149f7cb71ea7812211f2b752278859%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to