I'm attempting to convert an existing playbook we've used for years into a REST compatible one.
The playbook creates qtrees and applies NTFS ACLs to the path.
The equivalent ONTAP CLI commands for applying DACLs are as follows.
DACLs are created and defined by a Security Descriptor, e.g.
vserver security file-directory ntfs dacl add -vserver vs1 -ntfs-sd secsd1-qtree1-ntfs -access-type allow -account DOMAIN\Group1 -rights full -apply-to this-folder,sub-folders-files
vserver security file-directory ntfs dacl add -vserver vs1 -ntfs-sd secsd1-qtree1-ntfs -access-type allow -account DOMAIN\Group2 -rights change -apply-to this-folder,sub-folders-files
Tasks are then defined against a policy:
vserver security file-directory policy task add -vserver vs1 -policy-name secpol1 -path /volname/qtree1 -security-type ntfs -nfts-mode replace -ntfs-sd secsd1-qtree1-ntfs
In our existing playbook, these commands are covered by two tasks that are now deprecated:
- name: Add NTFS DACLs
na_ontap_ntfs_dacl:
state: present
vserver: vs1
security_descriptor: "secsd1-qtree1-ntfs"
account: "DOMAIN\Group1"
access_type: allow
rights: "full_control"
apply_to: this_folder,sub_folders,files
<<: *login
- name: Create file directory policy and add task
na_ontap_file_directory_policy:
state: present
vserver: vs1
policy_name: secpol1
path: "/volname/qtree1"
ntfs_sd: "secsd1-qtree1-ntfs"
ntfs_mode: replace
<<: *login
(Message split into two posts)