any idea how I would installed one specific KB and ignore anything else
from windows update?
would it be like this?
---
- name: Install updates on whitelist
hosts: all
tasks:
- name: Install windows updates
win_updates:
category_names:
- CriticalUpdates
- SecurityUpdates
whitelist:
- KB4056892
- KB4073117
server_selection: windows_update
state: installed
log_path: c:\ansible_wu.txt
register: update_result
- name: reboot host if required
win_reboot:
when: update_result.reboot_required == true
On Mon, May 18, 2020 at 5:39 AM Tony Wong <[email protected]> wrote:
> Thank you
>
> On Mon, May 18, 2020 at 12:58 AM Dick Visser <[email protected]>
> wrote:
>
>> Your register statement on the win_updates task is incorrectly indented
>>
>> On Mon, 18 May 2020 at 07:00, Tony Wong <[email protected]> wrote:
>> >
>> > this is my error
>> >
>> >
>> > FAILED! => {"msg": "The conditional check
>> 'update_result.reboot_required == true' failed. The error was: error while
>> evaluating conditional (update_result.reboot_required == true):
>> 'update_result' is undefined\n\nThe error appears to be in
>> '/home/tony/windows/install_windows_KBxxxxx_updates.yml': line 15, column
>> 7, but may\nbe elsewhere in the file depending on the exact syntax
>> problem.\n\nThe offending line appears to be:\n\n\n - name: reboot host
>> if required\n ^ here\n"}
>> >
>> > --
>> > 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/14e35a8f-ec2c-483c-ad83-008e4cf0445b%40googlegroups.com
>> .
>>
>>
>>
>> --
>> Dick Visser
>> Trust & Identity Service Operations Manager
>> GÉANT
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAL8fbwM7DAVJRUGpKRJh0%3DPfDrMGWJiN%2BypKPuEjkCnq4rWRKQ%40mail.gmail.com
>> .
>>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CALmkhkoc%2BQ6tLN9VBfQsuDxQq-VqsCAVyrUD7hbnGC_KcP3%3DYw%40mail.gmail.com.