inverse_inc / inverse_inc.windows / 1.0.2 / module / win_gpo_reg Configured a registry-based policy in a GPO. Authors: Jordan Borean (@jborean93) preview | supported by communityinverse_inc.windows.win_gpo_reg (1.0.2) — module
Install with ansible-galaxy collection install inverse_inc.windows:==1.0.2
collections: - name: inverse_inc.windows version: 1.0.2
This module will configure a registry based policy under either Computer COnfiguration or User Configuration in a Group Policy Object (GPO).
This uses the *-GPRegistryValue cmdlets and are restricted to what they can do, see U(https://docs.microsoft.com/en-us/powershell/module/grouppolicy/get-gpregistryvalue?view=win10-ps) for more details.
- name: set the value of the default registry property on the path win_gpo_reg: gpo: test-gpo path: HKLM\Software\Policies\Microsoft\Cryptography\PolicyServers value: '{3ae4929f-4e0f-4a31-bd53-8fc5a98c2390}' type: String
- name: set the value of a named registry property on the path win_gpo_reg: gpo: test-gpo path: HKLM\Software\Policies\Microsoft\Cryptography\PolicyServers\37c9dc30f207f27f61a2f7c3aed598a6e2920b54 name: PolicyID value: '{3ae4929f-4e0f-4a31-bd53-8fc5a98c2390}' type: String
gpo: description: - The GPO that contains the registry policy to configure. required: true name: description: - The name of the registry property to set the value for. - If omitted then this will be the default value of the key specified by I(path). path: description: - The registry path starting with either C(HKLM\) or C(HKCU\) to the registry key to configure. required: true type: choices: - String - ExpandString - Binary - DWord - MultiString - QWord default: String description: - The type of value to set. - If the type does not match the existing type, then a change will occur with the new type set. value: description: - The value of the registry property to set. - Not specifying this option will set the registry property to null.
before_type: description: The type of the value that was previously set returned: always sample: String type: str before_value: description: The value that was previously set returned: always sample: original value type: str