homelab/roles/bitwarden/handlers/main.yml

29 lines
766 B
YAML
Raw Normal View History

2022-05-27 04:03:49 +00:00
- name: Stop Bitwarden for rebuild
2023-05-04 03:42:55 +00:00
ansible.builtin.service:
2022-05-27 04:03:49 +00:00
name: "{{ bitwarden_name }}"
state: stopped
listen: rebuild_bitwarden
2021-02-27 05:00:52 +00:00
- name: Rebuild Bitwarden
2023-11-06 02:34:19 +00:00
ansible.builtin.command: "{{ bitwarden_root }}/bitwarden.sh rebuild"
listen: rebuild_bitwarden
- name: Reload systemd manager configuration
ansible.builtin.systemd:
daemon_reload: true
2021-02-27 05:00:52 +00:00
listen: rebuild_bitwarden
2022-05-27 04:03:49 +00:00
- name: Start Bitwarden after rebuild
2023-05-04 03:42:55 +00:00
ansible.builtin.service:
2022-05-27 04:03:49 +00:00
name: "{{ bitwarden_name }}"
state: started
enabled: true
listen: rebuild_bitwarden
2023-11-06 02:34:19 +00:00
- name: Create Bitwarden's initial log file
ansible.builtin.file:
path: "{{ bitwarden_logs_identity }}/{{ bitwarden_logs_identity_date }}.txt"
state: touch
mode: "644"
listen: touch_bitwarden