fix(docker): fix docker role handlers

This commit is contained in:
2024-12-28 18:34:46 +01:00
parent e95fa95336
commit 639e184f2d

View File

@@ -1,18 +1,17 @@
---
- name: test docker setup
block:
- name: run hello-world container
become: true
register: docker_test
community.docker.docker_container:
state: started
name: hello-world
image: hello-world
- 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
when: docker_test is changed
community.docker.docker_container:
state: absent
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