role-paperless-ngx/tasks/main.yml
2023-09-20 21:47:16 +02:00

71 lines
1.5 KiB
YAML

---
- name: Create podman folder
file:
path: /etc/containers/systemd
state: directory
mode: 0775
recurse: yes
- name: Create paperless data folder
file:
path: "/var/paperless-ngx/data"
state: directory
mode: 0775
recurse: yes
- name: Create paperless media folder
file:
path: "/var/paperless-ngx/media"
state: directory
mode: 0775
recurse: yes
- name: Create paperless export folder
file:
path: "/var/paperless-ngx/export"
state: directory
mode: 0775
recurse: yes
- name: Create paperless consume folder
file:
path: "/var/paperless-ngx/consume"
state: directory
mode: 0775
recurse: yes
- name: Create paperless redis folder
file:
path: "/var/paperless-ngx/redis"
state: directory
mode: 0775
recurse: yes
- name: Create paperless postgres folder
file:
path: "/var/paperless-ngx/postgres"
state: directory
mode: 0775
recurse: yes
- name: Setup Podman quadlet
block:
- name: Copy vaultwarden.container
ansible.builtin.template:
src: vaultwarden.quadlet.j2
dest: "/etc/containers/systemd/vaultwarden-{{ vaultwarden_identifier }}.container"
- name: "Reload systemd"
ansible.builtin.systemd:
daemon_reload: true
when: ansible_service_mgr == "systemd"
- name: Start Vaultwardne
systemd_service:
enabled: true
name: vaultwarden-{{ vaultwarden_identifier }}
state: started
notify:
- Restart Vaultwarden