#Create a Folder for HomeDir

1 messages · Page 1 of 1 (latest)

fringe grove
#

Hi ist there a way to create a folder under a volume to use the dynamic homedir feature ?

So that is the only point that I have to use a Windows server in my ansible playbook at the moment.

Or have I just not found it ?

deft phoenix
#

this REST API helps to create files or folders in ONTAP volume - https://library.netapp.com/ecmdocs/ECMLP2884821/html/index.html#/storage/file_info_create

`- name: get volume uuid
na_ontap_rest_info:
<<: *login
gather_subset:
- volume_info
parameters:
name: ansibleVolume39
register: result
- debug: var=result['ontap_info']['storage/volumes']['records'][0]['uuid']

- name: Create a directory
  na_ontap_restit:
    method: post
    api: "storage/volumes/{{result['ontap_info']['storage/volumes']['records'][0]['uuid']}}/files/dir3"
    body: { "type" : "directory", "unix-permissions" : "644"}
    <<: *login
  register: create
- assert:
    that:
      - create.status_code == 201
`