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