33 lines
805 B
YAML
33 lines
805 B
YAML
---
|
|
- name: Create docker volume
|
|
become: true
|
|
community.docker.docker_volume:
|
|
name: nextcloud
|
|
- name: Create redis container
|
|
include_role:
|
|
name: redis
|
|
vars:
|
|
preset: persistent
|
|
container_name: nextcloud-redis
|
|
docker_networks:
|
|
- name: nextcloud
|
|
docker_volume: nextcloud-redis
|
|
- name: Copy nextcloud config
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: config.php.j2
|
|
dest: "/var/lib/docker/volumes/nextcloud/_data/config/config.php"
|
|
owner: "33"
|
|
group: "33"
|
|
register: cfg
|
|
- include_tasks: start_server.yml
|
|
loop: [1, 2]
|
|
loop_control:
|
|
loop_var: server_idx
|
|
- name: Schedule background jobs
|
|
become: true
|
|
ansible.builtin.cron:
|
|
name: nextcloud
|
|
minute: "*/5"
|
|
job: "docker exec --user www-data nextcloud-1 php cron.php"
|
|
user: root
|