Hi guys,
I'm trying to return the following message; i basically want to display the
following message and only list the 'title' field for the available update.
The message should read;
" host1 has 12 updates available. The following updates are available for
install:
- KB11222
- KB112232
etc
"
I've tried a bunch of permutations, with the latest shown below (which
doesn't work by the way).
---
- hosts: all
gather_facts: no
vars:
win_update_categories:
- CriticalUpdates
- DefinitionUpdates
- SecurityUpdates
- Updates
- UpdateRollups
tasks:
- block:
- name: Checking for Available Windows Updates
win_updates:
category_names: "{{ win_update_categories }}"
state: searched
register: available_updates
- name: List missing Updates
debug:
msg: "{{ inventory_hostname }} has {{
available_updates.found_update_count }} updates available. The following
updates are available for install: {{ available_updates.contains.item }}"
with_items: "{{ title }}"
Anyone know where i'm going wrong?
Thanks in advance
--
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/4ecc86de-6d57-4a2f-8555-24e3be86bdce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.