dotfiles/roles/vaultwarden/tasks/main.yml

38 lines
897 B
YAML
Raw Permalink Normal View History

---
- 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"