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

26 lines
788 B
YAML
Raw Normal View History

2023-03-09 20:47:42 +00:00
---
- name: Verify
hosts: all
gather_facts: false
tasks:
2023-04-12 22:22:52 +00:00
- ansible.builtin.include_vars:
2023-03-09 20:47:42 +00:00
file: ../../defaults/main.yml
- name: Get piwigo db container state
2023-03-09 20:47:42 +00:00
community.docker.docker_container:
name: "{{ piwigo_db_container_name }}"
register: result_db
- name: Get piwigo container state
community.docker.docker_container:
name: "{{ piwigo_container_name }}"
2023-03-09 20:47:42 +00:00
register: result
- name: Check if piwigo containers are running
2023-03-09 20:47:42 +00:00
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false
- result_db.container['State']['Status'] == "running"
- result_db.container['State']['Restarting'] == false