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 service module to start and enable it, and the sharing_webdav module to configure shares. Use the certificate service to install a certificate for WebDAV over HTTPS.

Parameters

Parameter

Comments

auth_type

string

Authentication type.

Choices:

  • "NONE"

  • "BASIC"

  • "DIGEST"

certssl

string

The name of the certificate to use for HTTPS.

Use the certificate module to install a certificate.

password

string

WebDAV password, as a plaintext string.

port

integer

TCP port on which the HTTP service listens.

portssl

integer

TCP port on which the HTTPS service listens.

protocol

string

Protocol to use to connect to the WebDAV service.

The value “HTTPHTTPS” allows connecting using either HTTP or HTTPS.

Choices:

  • "HTTP"

  • "HTTPS"

  • "HTTPHTTPS"

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

webdav

dictionary

A data structure containing the new service configuration.

Returned: success

Sample: {"certssl": null, "htauth": "DIGEST", "id": 1, "password": "Password123", "protocol": "HTTP", "tcpport": 8080, "tcpportssl": 8081}