mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-15 19:42:06 +00:00
Fix docker_compose_v2 example. (#917)
This commit is contained in:
parent
48c0cdf2c5
commit
259f2cf8b7
@ -194,8 +194,13 @@ EXAMPLES = '''
|
||||
- name: Verify that web and db services are not running
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- "not output.services.web.flask_web_1.state.running"
|
||||
- "not output.services.db.flask_db_1.state.running"
|
||||
- web_container.State != 'running'
|
||||
- db_container.State != 'running'
|
||||
vars:
|
||||
web_container: >-
|
||||
{{ output.containers | selectattr("Service", "equalto", "web") | first }}
|
||||
db_container: >-
|
||||
{{ output.containers | selectattr("Service", "equalto", "db") | first }}
|
||||
|
||||
- name: Restart services
|
||||
community.docker.docker_compose_v2:
|
||||
@ -210,8 +215,13 @@ EXAMPLES = '''
|
||||
- name: Verify that web and db services are running
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- "output.services.web.flask_web_1.state.running"
|
||||
- "output.services.db.flask_db_1.state.running"
|
||||
- web_container.State == 'running'
|
||||
- db_container.State == 'running'
|
||||
vars:
|
||||
web_container: >-
|
||||
{{ output.containers | selectattr("Service", "equalto", "web") | first }}
|
||||
db_container: >-
|
||||
{{ output.containers | selectattr("Service", "equalto", "db") | first }}
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
||||
Loading…
Reference in New Issue
Block a user