--- - name: add group for nextcloud app group: name: nc-app gid: "{{ nextcloud_app_gid }}" - name: add user for nextcloud app user: name: nc-app uid: "{{ nextcloud_app_uid }}" group: nc-app password: "!" - name: add group for nextcloud db group: name: nc-db gid: "{{ nextcloud_db_gid }}" - name: add user for nextcloud db user: name: nc-db uid: "{{ nextcloud_db_uid }}" group: nc-db password: "!" - name: add group for nextcloud redis group: name: nc-redis gid: "{{ nextcloud_redis_gid }}" - name: add user for nextcloud redis user: name: nc-redis uid: "{{ nextcloud_redis_uid }}" group: nc-redis password: "!" - name: install template systemd unit for cron trigger template: src: cron@.service.j2 dest: /etc/systemd/system/nextcloud-cron@.service - name: install management scripts loop: - nextcloud-upgrade - nextcloud-occ - nextcloud-cron template: src: "{{ item }}.j2" dest: "/usr/local/bin/{{ item }}" mode: 0755