# win\_audit\_policy\_system module not changing the value

**URL:** <https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [January 29, 2021, 10:19am UTC](https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535 "2021-01-29T10:19:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![srini\_mas](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@srini\_mas](https://forum.ansible.com/u/srini_mas)\
**Post date:** [January 29, 2021, 10:19am UTC](https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535/1 "2021-01-29T10:19:24Z")

</div>

Hi,

Trying to use ansible on windows server 2016. winRM connection works and other modules run perfectly fine.

simple playbook and run win\_audit\_policy\_system to change the values.

**- name: “Ensure ‘Audit Application Group Management’ is set to ‘Success and Failure’”**  
**win\_audit\_policy\_system:**  
**subcategory: Application Group Management**  
**audit\_type: success, failure**

**- name: “Ensure ‘Audit Computer Account Management’ is set to ‘Success and Failure’”**  
**win\_audit\_policy\_system:**  
**subcategory: Computer Account Management**  
**audit\_type: success, failure**

When I go to check on the Machine, the state of the policy does not change. I already restarted the machine and run the gpupdate /force. Any ideas?

 ![audit policy.png](https://us1.discourse-cdn.com/ansible/original/2X/4/4e0782a9199a980d7a70fd5887423597bfa80e77.png)

---

<div class="post-metadata">

**Author:** ![srini\_mas](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@srini\_mas](https://forum.ansible.com/u/srini_mas)\
**Post date:** [January 30, 2021, 4:16am UTC](https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535/2 "2021-01-30T04:16:18Z")

</div>

Hello,

Hope anyone could help me!

> **(attachments)**
>
> ![audit policy.png](https://us1.discourse-cdn.com/ansible/original/2X/4/4e0782a9199a980d7a70fd5887423597bfa80e77.png)

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [January 30, 2021, 7:20am UTC](https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535/3 "2021-01-30T07:20:37Z")

</div>

Try running with more verbosity?

> **(attachments)**
>
> ![audit policy.png](https://us1.discourse-cdn.com/ansible/original/2X/4/4e0782a9199a980d7a70fd5887423597bfa80e77.png)

---

<div class="post-metadata">

**Author:** ![srini\_mas](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@srini\_mas](https://forum.ansible.com/u/srini_mas)\
**Post date:** [January 30, 2021, 8:04am UTC](https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535/4 "2021-01-30T08:04:26Z")

</div>

Hello Visser,

The values were changed in CLI but not changed in GUI.

There is one interesting things.The value was changed both GUI and CLI If I run with category options.

- name: “Audit account management”  
win\_audit\_policy\_system:  
category: Account management  
audit\_type: success, failure

- name: “Audit directory service access”  
win\_audit\_policy\_system:  
category: DS Access  
audit\_type: success, failure

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/7/706933c26da2c98a20dc898027eb75b5b12c94c0.png)

If I run with subcategory options,the value was not changed in GUI.

- name: “17.2.1,CCE-38329-9 | Ensure ‘Audit Application Group Management’ is set to ‘Success and Failure’”  
win\_audit\_policy\_system:  
subcategory: Application Group Management  
audit\_type: success, failure

- name: “17.2.2,CCE-38004-8 | Ensure ‘Audit Computer Account Management’ is set to ‘Success and Failure’”  
win\_audit\_policy\_system:  
subcategory: Computer Account Management  
audit\_type: success, failure

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/9/9aa7ebcf6b6a34d0243d79fda06922a8906db0fb.png)

> **(attachments)**
>
> ![audit policy.png](https://us1.discourse-cdn.com/ansible/original/2X/4/4e0782a9199a980d7a70fd5887423597bfa80e77.png)

---

<div class="post-metadata">

**Author:** ![srini\_mas](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@srini\_mas](https://forum.ansible.com/u/srini_mas)\
**Post date:** [January 31, 2021, 9:22am UTC](https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535/5 "2021-01-31T09:22:23Z")

</div>

Hello !

> **(attachments)**
>
> ![audit policy.png](https://us1.discourse-cdn.com/ansible/original/2X/4/4e0782a9199a980d7a70fd5887423597bfa80e77.png)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/9/9aa7ebcf6b6a34d0243d79fda06922a8906db0fb.png)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/7/706933c26da2c98a20dc898027eb75b5b12c94c0.png)
