2024-02-03 21:12:59 +00:00
|
|
|
---
|
|
|
|
- name: Create podman folder
|
|
|
|
file:
|
|
|
|
path: /etc/containers/systemd
|
|
|
|
state: directory
|
|
|
|
mode: 0775
|
|
|
|
recurse: yes
|
|
|
|
|
|
|
|
- name: Create nextcloud folder
|
|
|
|
file:
|
|
|
|
path: "/var/nextcloud/app"
|
|
|
|
state: directory
|
|
|
|
mode: 0775
|
|
|
|
recurse: yes
|
|
|
|
|
|
|
|
- name: Create nginx folder
|
|
|
|
file:
|
|
|
|
path: "/var/nextcloud/web"
|
|
|
|
state: directory
|
|
|
|
mode: 0775
|
|
|
|
recurse: yes
|
|
|
|
|
|
|
|
- name: Create paperless redis folder
|
|
|
|
file:
|
|
|
|
path: "/var/nextcloud/redis"
|
|
|
|
state: directory
|
|
|
|
mode: 0775
|
|
|
|
recurse: yes
|
|
|
|
|
|
|
|
- name: Create paperless postgres folder
|
|
|
|
file:
|
|
|
|
path: "/var/nextcloud/postgres"
|
|
|
|
state: directory
|
|
|
|
mode: 0775
|
|
|
|
recurse: yes
|
|
|
|
|
|
|
|
- name: Copy nginx.conf
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: nginx.conf.j2
|
|
|
|
dest: "/var/nextcloud/web/nginx.conf"
|
|
|
|
|
|
|
|
- name: Setup Podman quadlet
|
|
|
|
block:
|
|
|
|
- name: Copy nextcloud.network
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: nextcloud.network
|
|
|
|
dest: "/etc/containers/systemd/nextcloud.network"
|
|
|
|
|
|
|
|
- name: Copy nextcloud-app.container
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: nextcloud-app.quadlet.j2
|
|
|
|
dest: "/etc/containers/systemd/nextcloud-app.container"
|
|
|
|
|
|
|
|
- name: Copy nextcloud-cron.container
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: nextcloud-cron.quadlet.j2
|
|
|
|
dest: "/etc/containers/systemd/nextcloud-cron.container"
|
|
|
|
|
|
|
|
- name: Copy nextcloud-postgres.container
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: nextcloud-postgres.quadlet.j2
|
|
|
|
dest: "/etc/containers/systemd/nextcloud-postgres.container"
|
|
|
|
|
|
|
|
- name: Copy nextcloud-redis.container
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: nextcloud-redis.quadlet.j2
|
|
|
|
dest: "/etc/containers/systemd/nextcloud-redis.container"
|
|
|
|
|
|
|
|
- name: Copy nextcloud-web.container
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: paperless-ngx-tika.quadlet.j2
|
|
|
|
dest: "/etc/containers/systemd/nextcloud-web.container"
|
|
|
|
|
|
|
|
- name: "Reload systemd"
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
daemon_reload: true
|
|
|
|
when: ansible_service_mgr == "systemd"
|
|
|
|
|
2024-02-03 21:47:53 +00:00
|
|
|
- name: Start Nextcloud Redis
|
2024-02-03 21:12:59 +00:00
|
|
|
systemd_service:
|
|
|
|
enabled: true
|
2024-02-03 21:47:53 +00:00
|
|
|
name: nextcloud-redis
|
2024-02-03 21:12:59 +00:00
|
|
|
state: started
|
|
|
|
|
|
|
|
- name: Start Paperless-ngs Postgres
|
|
|
|
systemd_service:
|
|
|
|
enabled: true
|
|
|
|
name: paperless-ngx-postgres
|
|
|
|
state: started
|
2024-02-03 21:47:53 +00:00
|
|
|
|
2024-02-03 21:12:59 +00:00
|
|
|
notify:
|
2024-02-03 21:47:53 +00:00
|
|
|
- Restart Nextcloud App
|
|
|
|
- Restart Nextcloud Cron
|
|
|
|
- Restart Nextcloud Web
|