--- - name: nextcloud directory file: path: "{{nextcloud_directory}}" state: directory owner: root group: www-data mode: 0750 - name: nextcloud subdirectories file: path: "{{nextcloud_directory}}/{{item}}" state: directory owner: www-data group: www-data recurse: yes with_items: - config - apps - themes - updater - name: nextcloud custom apps directory file: path: "{{nextcloud_directory}}/custom_apps" state: directory owner: www-data group: www-data mode: 0750 - name: nextcloud lib directory file: path: "{{nextcloud_lib_directory}}" state: directory owner: www-data group: www-data mode: 0750 - name: nextcloud data directory file: path: "{{nextcloud_data_directory}}" state: directory owner: www-data group: www-data mode: 0750 recurse: yes - name: nextcloud log directory file: path: "{{nextcloud_log_directory}}" state: directory owner: www-data group: www-data - name: nextcloud backup directory file: path: "{{nextcloud_backup_directory}}" state: directory owner: root group: root mode: 0700 - name: nextcloud htaccess webserver access file: path: "{{nextcloud_directory}}/.htaccess" state: file owner: www-data group: www-data