ansible-nas/roles/bitwarden/molecule/default/verify.yml

26 lines
791 B
YAML
Raw Normal View History

2022-09-11 17:23:58 +00:00
---
- name: Verify
hosts: all
gather_facts: false
tasks:
2023-04-12 22:29:29 +00:00
- ansible.builtin.include_vars:
2022-09-11 17:23:58 +00:00
file: ../../defaults/main.yml
- name: Get container state
2023-04-15 13:11:49 +00:00
community.docker.docker_container_info:
2022-09-11 17:23:58 +00:00
name: "{{ bitwarden_container_name }}"
register: result
- name: Get container state
2023-04-15 13:11:49 +00:00
community.docker.docker_container_info:
2022-09-11 17:23:58 +00:00
name: "{{ bitwarden_backup_container_name }}"
register: result_backup
- name: Check Bitwarden is running
2023-04-12 22:29:29 +00:00
ansible.builtin.assert:
2022-09-11 17:23:58 +00:00
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false
- result_backup.container['State']['Status'] == "running"
- result_backup.container['State']['Restarting'] == false