--- - name: Create directories file: path: "{{ item }}" state: directory with_items: - "{{ data_folder }}/vaultwarden" - "{{ data_folder }}/vaultwarden/config" - "{{ data_folder }}/vaultwardenbackup" - "{{ data_folder }}/vaultwardenbackup/config" - "{{ data_folder }}/vaultwardenbackup/config/rclone" - name: Create the vaultwarden container docker_container: name: vaultwarden image: vaultwarden/server:1.32.4 restart_policy: unless-stopped recreate: true networks: - name: proxy env: PUID: "1000" PGID: "1000" TZ: "Australia/Brisbane" volumes: - "{{ data_folder }}/vaultwarden/data:/data" labels: traefik.enable: "true" traefik.http.routers.vaultwarden.rule: "Host(`vault.comprofix.com`)" traefik.http.routers.vaultwarden.entrypoints: "https" traefik.http.routers.vaultwarden.tls: "true" traefik.http.routers.vaultwarden.service: "vaultwarden" traefik.http.services.vaultwarden.loadbalancer.server.port: "80" register: container - name: Copy rclone config copy: src: scripts/rclone.conf dest: "{{ data_folder }}/vaultwardenbackup/config/rclone/rclone.conf" decrypt: yes mode: "0600" - name: Create the vaultwarden container docker_container: name: vaultwardenbackup image: ttionya/vaultwarden-backup:1.21.2 restart_policy: unless-stopped recreate: true env: PUID: "1000" PGID: "1000" TZ: "Australia/Brisbane" CRON: "0 4 * * *" BACKUP_KEEP_DAYS: "14" ZIP_PASSWORD: "{{ VAULTWARDEN_BACKUP_ZIP_PASSWORD }}" volumes: - "{{ data_folder }}/vaultwarden/data:/bitwarden/data" - "{{ data_folder }}/vaultwardenbackup/config:/config" register: container