--- - name: run hello-world container become: true listen: docker_run_test notify: docker_rm_test community.docker.docker_container: state: started name: hello-world image: hello-world - name: remove hello-world container become: true listen: docker_rm_test community.docker.docker_container: state: absent name: hello-world image: hello-world