This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
vars:
|
||||
project_name: movie-db
|
||||
install_dir: "/opt/{{ project_name }}"
|
||||
|
||||
|
||||
tasks:
|
||||
- name: Create installation directory
|
||||
@@ -44,5 +45,16 @@
|
||||
- name: Start application with Docker Compose
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ install_dir }}"
|
||||
state: present
|
||||
project_name: "{{ project_name }}"
|
||||
recreate: always
|
||||
register: compose_output
|
||||
|
||||
- name: Verify that web and db services are running
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- pythonapp.State == 'running'
|
||||
vars:
|
||||
pythonapp: >-
|
||||
{{ compose_output.containers | selectattr("Service","equalto", "movie-db-web") | first }}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user