- name: mailman check for running containers command: pgrep -f uwsgi ignore_errors: yes register: uwsgi_pids - name: mailman restart containers if running # Also makes sure the containers weren't just restarted by an image update when: uwsgi_pids.rc == 0 and "is up-to-date" in mailman_dcup.stderr block: - name: down containers shell: cmd: docker-compose -f /etc/mailman-compose/docker-compose.yaml down - name: up containers shell: cmd: docker-compose -f /etc/mailman-compose/docker-compose.yaml up -d