Make examples in YAML format - windows/win_acl.py (#18836)
* Make examples in YAML format - windows/win_acl.py * Raw string
This commit is contained in:
parent
c546c12b60
commit
3c64ccd6e1
1 changed files with 24 additions and 23 deletions
|
@ -109,38 +109,39 @@ options:
|
||||||
author: Phil Schwartz (@schwartzmx), Trond Hindenes (@trondhindenes), Hans-Joachim Kliemeck (@h0nIg)
|
author: Phil Schwartz (@schwartzmx), Trond Hindenes (@trondhindenes), Hans-Joachim Kliemeck (@h0nIg)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r'''
|
||||||
# Restrict write,execute access to User Fed-Phil
|
- name: Restrict write and execute access to User Fed-Phil
|
||||||
$ ansible -i hosts -m win_acl -a "user=Fed-Phil path=C:\Important\Executable.exe type=deny rights='ExecuteFile,Write'" all
|
win_acl:
|
||||||
|
user: Fed-Phil
|
||||||
|
path: C:\Important\Executable.exe
|
||||||
|
type: deny
|
||||||
|
rights: ExecuteFile,Write
|
||||||
|
|
||||||
# Playbook example
|
|
||||||
# Add access rule to allow IIS_IUSRS FullControl to MySite
|
|
||||||
---
|
|
||||||
- name: Add IIS_IUSRS allow rights
|
- name: Add IIS_IUSRS allow rights
|
||||||
win_acl:
|
win_acl:
|
||||||
path: 'C:\inetpub\wwwroot\MySite'
|
path: C:\inetpub\wwwroot\MySite
|
||||||
user: 'IIS_IUSRS'
|
user: IIS_IUSRS
|
||||||
rights: 'FullControl'
|
rights: FullControl
|
||||||
type: 'allow'
|
type: allow
|
||||||
state: 'present'
|
state: present
|
||||||
inherit: 'ContainerInherit, ObjectInherit'
|
inherit: ContainerInherit, ObjectInherit
|
||||||
propagation: 'None'
|
propagation: 'None'
|
||||||
|
|
||||||
# Remove previously added rule for IIS_IUSRS
|
# Remove previously added rule for IIS_IUSRS
|
||||||
- name: Remove FullControl AccessRule for IIS_IUSRS
|
- name: Remove FullControl AccessRule for IIS_IUSRS
|
||||||
path: 'C:\inetpub\wwwroot\MySite'
|
path: C:\inetpub\wwwroot\MySite
|
||||||
user: 'IIS_IUSRS'
|
user: IIS_IUSRS
|
||||||
rights: 'FullControl'
|
rights: FullControl
|
||||||
type: 'allow'
|
type: allow
|
||||||
state: 'absent'
|
state: absent
|
||||||
inherit: 'ContainerInherit, ObjectInherit'
|
inherit: ContainerInherit, ObjectInherit
|
||||||
propagation: 'None'
|
propagation: 'None'
|
||||||
|
|
||||||
# Deny Intern
|
# Deny Intern
|
||||||
- name: Deny Deny
|
- name: Deny Deny
|
||||||
path: 'C:\Administrator\Documents'
|
path: C:\Administrator\Documents
|
||||||
user: 'Intern'
|
user: Intern
|
||||||
rights: 'Read,Write,Modify,FullControl,Delete'
|
rights: Read,Write,Modify,FullControl,Delete
|
||||||
type: 'deny'
|
type: deny
|
||||||
state: 'present'
|
state: present
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue