homelab/roles/vaultwarden/tasks/main.yml

27 lines
806 B
YAML

---
- name: Create vaultwarden docker volume
become: true
community.docker.docker_volume:
name: vaultwarden
- name: Create vaultwarden container
become: true
community.docker.docker_container:
name: vaultwarden
image: vaultwarden/server:1.32.0
env:
DOMAIN: "{{ domain }}"
LOG_LEVEL: "{{ log_level }}"
DATABASE_URL: "{{ db_url }}"
SIGNUPS_ALLOWED: "{{ signups_allowed | string }}"
SMTP_HOST: "{{ smtp_host }}"
SMTP_FROM: "{{ smtp_from }}"
SMTP_PORT: "{{ smtp_port | string }}"
SMTP_SECURITY: "{{ smtp_security }}"
SMTP_USERNAME: "{{ smtp_username }}"
SMTP_PASSWORD: "{{ smtp_password }}"
networks:
- name: postgresql
- name: haproxy
volumes:
- vaultwarden:/data
restart_policy: unless-stopped