arensb.truenas.webdav module – Configure the WebDAV service
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.webdav.
New in arensb.truenas 1.15.0
Synopsis
Configures how to access the WebDAV service: the port, username, password, and so on.
Use the
servicemodule to start and enable it, and thesharing_webdavmodule to configure shares. Use thecertificateservice to install a certificate for WebDAV over HTTPS.
Parameters
Parameter |
Comments |
|---|---|
Authentication type. Choices:
|
|
The name of the certificate to use for HTTPS. Use the |
|
WebDAV password, as a plaintext string. |
|
TCP port on which the HTTP service listens. |
|
TCP port on which the HTTPS service listens. |
|
Protocol to use to connect to the WebDAV service. The value “HTTPHTTPS” allows connecting using either HTTP or HTTPS. 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 containing the new service configuration. Returned: success Sample: |