- hosts: [{{host}}] sudo: yes tasks: - name: mariadb container docker: name: {{ resource_name }} image: {{ image }} state: absent - file: path=/var/lib/docker/data/{{resource_name}} state=absent