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

33 lines
1.1 KiB
YAML

---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml
- name: Get paperless_ng redis container state
community.docker.docker_container:
name: "{{ paperless_ng_redis_container_name }}"
register: result_redis
- name: Get paperless_ng db container state
community.docker.docker_container:
name: "{{ paperless_ng_db_container_name }}"
register: result_db
- name: Get paperless_ng container state
community.docker.docker_container:
name: "{{ paperless_ng_uiserver_container_name }}"
register: result
- name: Check if paperless_ng containers are running
ansible.builtin.assert:
that:
- result_redis.container['State']['Status'] == "running"
- result_redis.container['State']['Restarting'] == false
- result_db.container['State']['Status'] == "running"
- result_db.container['State']['Restarting'] == false
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false