2024-09-26 22:02:36 +00:00
|
|
|
---
|
|
|
|
- name: Set common facts
|
|
|
|
ansible.builtin.import_tasks: tasks/set-default-facts.yml
|
|
|
|
|
2024-10-13 19:48:04 +00:00
|
|
|
- name: Deploy {{ role_name }}
|
2024-09-26 22:02:36 +00:00
|
|
|
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
|