I am working on win_regedit playbook to restrict software.
So far the win_regedit playbook gets created for HKEY_LOCAL_MACHINE below
is the playbook:
---
- hosts: windows
tasks:
- name: Creating a registry
win_regedit:
path:
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun
- name: Modifying a registry, adding name and data
win_regedit:
path:
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun
value: 1
datatype: string
data: 'cmd.exe'
But Registry is not getting created for HKEY_CURRENT_USER
---
- hosts: windows
tasks:
- name: Creating a registry
win_regedit:
path:
HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun
- name: Modifying a registry, adding name and data
win_regedit:
path:
HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun
value: 1
datatype: string
data: 'cmd.exe'
Even tried writing simple registry
---
- hosts: windows
tasks:
- name: Creating a registry
win_regedit:
path: HKCU:\Software\MyCompany
Thanks in Advance!!
--
Kumaresh
--
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/241948d9-974c-426d-bcb2-917af7f324cd%40googlegroups.com.