This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
vars:
|
vars:
|
||||||
project_name: movie-db
|
project_name: movie-db
|
||||||
install_dir: "/opt/{{ project_name }}"
|
install_dir: "/opt/{{ project_name }}"
|
||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create installation directory
|
- name: Create installation directory
|
||||||
@@ -44,5 +45,16 @@
|
|||||||
- name: Start application with Docker Compose
|
- name: Start application with Docker Compose
|
||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
project_src: "{{ install_dir }}"
|
project_src: "{{ install_dir }}"
|
||||||
state: present
|
project_name: "{{ project_name }}"
|
||||||
recreate: always
|
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