arensb.truenas.sharing_webdav module – Manage WebDAV shares
Note
This module is part of the arensb.truenas collection (version 2.0.3).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install arensb.truenas.
To use it in a playbook, specify: arensb.truenas.sharing_webdav.
New in arensb.truenas 1.15.0
Synopsis
Create, manage, and delete WebDAV shares.
This only works on TrueNAS CORE. For SCALE, there is a separate WebDAV application.
Parameters
Parameter |
Comments |
|---|---|
If true, change the ownership of all files to user If false, files to be shared must be manually updated to be owned by group Default: |
|
Human-readable description of the share. |
|
If true, the share is enabled. Otherwise, it is present but disabled. This has no effect if Choices:
|
|
Name of the share. This is an identifier. |
|
Directory (path) to be shared. |
|
If true, this share is read-only, i.e., users may not write to it. Choices:
|
|
Whether the share should exist or not. Choices:
|
Examples
# Turn on WebDAV, configure it, and create a share.
- name: Configure WebDAV
hosts: myhosts
become: yes
tasks:
- name: Create SMS backup directory
arensb.truenas.sharing_webdav:
name: myshare
path: "/mnt/tank/myfilesystem/myshare"
- name: Configure WebDAV service
arensb.truenas.webdav:
protocol: HTTP
port: 9100
password: "{{ webdav_password }}"
auth_type: BASIC
- name: Enable WebDAV service
arensb.truenas.service:
name: webdav
state: started
enabled: yes
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
A data structure describing a created or modified share. Returned: success Sample: |