Actually, it didn't quite work :(  The task was able to run through but I 
just realized it was not importing the file in correct as a list for the 
whitelist.  

On Monday, August 26, 2019 at 8:47:40 AM UTC-4, Tuyen Nguyen wrote:
>
>
> 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]> 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].
>>> 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/eacad4f6-9f4b-408b-ba06-7d8985404110%40googlegroups.com.

Reply via email to