I am trying to create a playbook that will setup specific directories and ACLs on a Windows host.
I can setup the ACL with a local user on the windows host but when I try setup the ACL for a domain account, I get back the following error:
TASK [Grant domain account full access to this directory] **
fatal: [computer FQDN]: FAILED! => {"changed": false, "failed": true, "msg": "an error occurred when attempting to present FullControl permission(s) on E:\\Test for ans...@DEV.LOCAL - Exception calling \".ctor\" with \"1\" argument(s): \"Value was invalid.\r\nParameter name: sddlForm\""}
Can win_acl be used to control ACLs for Domain accounts?
The play book is run with:
ansible-playbook -i development demo.yaml
Ansible is configured to use winrm over SSL. I have tried with both Kerberos authentication and NTLM.
I can manually set the ACL if I connect through remote desktop with the account used to connect via winrm.
I have been able to make other win_ modules work. I can use the win_service module to set Windows services to run as domain users.
The playbook contains:
---
- name: Test win_acl
hosts: all
gather_facts: false
tasks:
- name: Create root directory
win_file:
path: E:\Test
state: directory
- name: Grant domain account full access to this directory
win_acl:
user: ans...@DEV.LOCAL
path: E:\Test
rights: FullControl
type: allow
state: present
Version of Ansible:
ansible 2.3.0.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Sep 1 2016, 22:14:00) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
Target Windows host is running Windows Server 2016.
Any assistance, would be appreciated.
Thank you
James