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/CAKEXu854WEaEULKpUK_qBPe%3D%3DnUQuObrfSXkNy03_3OK%3DxsuNQ%40mail.gmail.com.

Reply via email to