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