Each module call must be in it's own task block.  Effectively a task block
is indicated with a hyphen under tasks.  In your case, you specify
`-name: Miscellaneous Security Settings` as a task block with 3 calls to
win_regedit.

You will need to make each win_regedit call it's own task.

On Mon, Nov 7, 2016 at 11:51 AM, Todd Schaal <[email protected]> wrote:

> I get the warning "found a duplicate dict key" when trying to modify
> multiple values under a single key.  What's the appropriate way to do
> this?  I've tried using separate tasks or using a like as below,  but I
> still get the same message:
>
>
>
> - name: Miscellaneous Security Settings
>   win_regedit:
>       key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
>       value: "{{item.value}}"
>       data: "{{item.data}}"
>       datatype: "{{item.datatype}}"
>   with_items:
>     - value : dontdisplaylastusername
>       data: 1
>       datatype: dword
>     - vlaue: legalnoticecaption
>       data: Warning
>       datatype: string
>   win_regedit:
>       key: HKLM:\SYSTEM\CurrentControlSet\Control\Lsa
>       vlaue: restrictanonymous
>       data: 1
>       datatype: dword
>   win_regedit:
>       key: HKLM:\SYSTEM\CurrentControlSet\Control\Lsa
>       vlaue: restrictanonymoussam
>       data: 1
>       datatype: dword
>
>
>
>
> --
> 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/b555c19b-458b-4d28-8dbe-fc884aa2a261%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/b555c19b-458b-4d28-8dbe-fc884aa2a261%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v_1dy1Up5pR5s09PyhAh4bL8jB673Gr4q%3DkrvA24e5KXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to