dotfiles/roles/vaultwarden/tasks/main.yml
Matej Focko 69db34f4ff
fix(vaultwarden): handle reverse proxy
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:47:36 +01:00

37 lines
897 B
YAML

---
- name: Install the Vaultwarden quadlets
ansible.builtin.template:
src: "templates/{{ item }}"
dest: "/etc/containers/systemd/{{ item }}"
mode: 0644
owner: root
group: root
loop:
- vaultwarden.container
- vaultwarden.network
- vaultwarden.volume
- name: Install environment file for Vaultwarden
ansible.builtin.template:
src: templates/vaultwarden.ini
dest: /etc/vaultwarden.ini
mode: 0600
owner: root
group: root
- name: Install the reverse proxy config
ansible.builtin.template:
src: templates/nginx.conf
dest: "/etc/nginx/conf.d/vaultwarden.conf"
mode: 0644
owner: root
group: root
when: vaultwarden_reverse_proxy
notify: Restart nginx
- name: Enable the Vaultwarden quadlet
ansible.builtin.systemd_service:
daemon_reload: true
enabled: true
name: vaultwarden.service
state: "started"