29 lines
888 B
YAML
29 lines
888 B
YAML
|
---
|
||
|
- name: Set common facts
|
||
|
ansible.builtin.import_tasks: tasks/set-default-facts.yml
|
||
|
|
||
|
- name: Deploy {{ svc.name }}
|
||
|
vars:
|
||
|
svc: "{{ healthcheck_svc }}"
|
||
|
env: "{{ healthcheck_env }}"
|
||
|
block:
|
||
|
- name: Import tasks to create service directory
|
||
|
ansible.builtin.import_tasks: tasks/steps/create-service-directory.yml
|
||
|
|
||
|
- name: Import tasks specific to docker
|
||
|
ansible.builtin.import_tasks: docker.yml
|
||
|
- name: Import tasks specific to systemd
|
||
|
ansible.builtin.import_tasks: systemd.yml
|
||
|
|
||
|
- name: Import tasks create a service.env file
|
||
|
ansible.builtin.import_tasks: tasks/steps/template-service-env.yml
|
||
|
|
||
|
- name: Build service
|
||
|
ansible.builtin.command:
|
||
|
cmd: docker compose build --pull
|
||
|
chdir: "{{ service_path }}"
|
||
|
when:
|
||
|
- "'local-dev' != inventory_hostname"
|
||
|
register: cmd_result
|
||
|
changed_when: true
|