Default variable details

Some of debops.owncloud default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.


Dict keys can be overridden when they are present in multiple dicts. Order of priority from least to most specific:

Each variable can hold multiple keys and values. The dict value can either be a value directly intended for ownCloud (corresponding directly to the value in the config.php file) or a dict itself in case more flexibility is required. A ownCloud value can also be a dict. The decision is made based on the presence of the value and the state keys. If both are present, the state key will be evaluated by Ansible. Here are the available options of the inner dict:


Required, string. Corresponding to the value in the config.php file.


Required, string. Allows to specify if the option should be present or absent in the configuration.


Parameters with (backslash) need to be double escaped:

  memcache.local: '\\OC\\Memcache\\APCu'

This is not confirmed by the official ownCloud documentation but is a result of how the configuration file is generated using JSON as intermediate data format.

Refer to the official ownCloud documentation for details about the available configuration options.

Change/Disable skeleton files for new users (example)

The skeleton files which new users get copied into there ownCloud profile on first login can be changed by the skeletondirectory setting which points to the skeleton directory to use.

In case users should primarily stored their files on external storage, it can make sense to not provided any skeleton files at all. This can be archived by putting:


  ## Points to the skeleton directory to use on first login of users.
  ## If this setting is an empty string, no files will be provided by default.
  skeletondirectory: ''

into your Ansible inventory.


This section describes the options of owncloud__user_files and similar lists.

Each list item is a dict with the following keys:


Path to the source file on the Ansible Controller. Alternatively you can use content to provide the file contents directly in the inventory.


String or YAML text block with the file contents to put in the destination file. Alternatively you can use src to provide the path to the source file on Ansible Controller.


Required, string. Path of the destination. The first directory is the user id. Example: user_id/files/path. The destination on the remote host will be owncloud__data_path + "/" + item.dest.


Optional. If not specified, or if specified and present, the file(s) will be created. If specified and absent, file will be removed.

Additionally, all parameters of the Ansible ansible.builtin.copy module are supported.

The reason why these lists exist (instead of using debops.resources) is that ownCloud needs to be aware of any changes.


Provide an immutable file in the root directory of the ownCloud admin user:


  - dest: '{{ owncloud__admin_username }}/files/'
    content: |
      This ownCloud instance is managed by Ansible.
      Changes done via the ownCloud web interface might be overwritten
      by subsequent Ansible runs.
      Refer to for details.
    owner: 'root'
    group: 'root'

Provide an file in the project_a subdirectory of the ownCloud admin user. The project_a directory will be created if it does not already exist. The ownCloud admin user can change/delete the file and directory:


  - dest: '{{ owncloud__admin_username }}/files/project_a/'
    content: |
      File template.
      Changes done to this file will be overwritten by subsequent Ansible runs.


The owncloud__ldap_*_config variables define the configuration of the "LDAP user and group backend" Nextcloud plugin. The configuration is stored in the Nextcloud database and can be manipulated using the occ ldap:* commands. To view the current LDAP configuration and possible parameters, you can run the command:

occ ldap:show-config

Detailed information about configuring the LDAP support in Nextcloud can be found in the Nextcloud LDAP documentation page


The owncloud__ldap_default_config variable contains the default parameters used to configure the LDAP support.

To modify the default values, or add new parameters, you can define them in the Ansible inventory using the owncloud__ldap_config variable, for example:


  - name: 'turnOnPasswordChange'
    value: '0'


The owncloud__ldap_*_config variables contain a list of YAML dictionaries, each dictionary defines a single configuration entry using specific parameters:


Required. The name of the LDAP plugin configuration option, case-sensitive. Multiple configuration entries with the same name parameter are merged together and can affect each other.


Required. The value of the configuration option, should be specified as a string.


Optional. If not specified or present, a given configuration option will be set in the database. If absent, the configuration will not be set (existing configuration value stays intact). If ignore, a given configuration entry will not be evaluated during role execution.