36 lines
833 B
YAML
36 lines
833 B
YAML
|
---
|
||
|
- name: Create podman folder
|
||
|
file:
|
||
|
path: /etc/containers/systemd
|
||
|
state: directory
|
||
|
mode: 0775
|
||
|
recurse: yes
|
||
|
|
||
|
- name: Create data folder
|
||
|
file:
|
||
|
path: "/var/vaultwarden/{{ vaultwarden_identifier }}"
|
||
|
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 traefik
|
||
|
|