HI
Thank you for directing me in the right direction!
I did the following and it worked
win_updates:
category_name:
- SecurityUpdates
- CriticalUpdates
- UpdatesRollups
state: installed
whitelist:
- "{{lookup('file','patchlist.txt')}}"
reboot: yes
On Thursday, August 22, 2019 at 3:37:34 PM UTC-4, Zolvaring wrote:
>
> I'm not able to test this at the moment, but I think the file lookup is
> what you want:
>
> Mylist: "{{ lookup('file', '/path/to/my/yaml/list') }}"
>
> On Thu, Aug 22, 2019, 12:34 PM Tuyen Nguyen <[email protected]
> <javascript:>> wrote:
>
>> Hi
>>
>> I am using the win_updates module and I want to include a list of
>> approved patches in the whitelist option. I have the list of all my
>> approved patches in a file already, and I would like to know if and how I
>> can import this file to use?
>>
>> As in example, can I import the list somehow to be a variable called
>> patchlist ?
>>
>> And then in the win_updates module, I could do
>>
>> win_updates:
>> category_name:
>> - SecurityUpdates
>> - CriticalUpdates
>> - UpdatesRollups
>> state: installed
>> whitelist: {{ patchlist }
>> reboot: yes
>>
>>
>>
>>
>> --
>> 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] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/96e2dda9-3c74-4894-aed6-cf350c18c7b6%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/96e2dda9-3c74-4894-aed6-cf350c18c7b6%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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/598d0d71-af4f-4aff-b6da-221936a47e03%40googlegroups.com.