This repository has been archived on 2024-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
services/roles/healthcheck/tasks/main.yml

29 lines
888 B
YAML
Raw Normal View History

2023-12-09 19:12:42 +00:00
---
2023-12-14 01:20:13 +00:00
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
2023-12-09 19:12:42 +00:00
- name: Deploy {{ svc.name }}
2023-12-14 01:20:13 +00:00
vars:
svc: "{{ healthcheck_svc }}"
env: "{{ healthcheck_env }}"
2023-12-09 19:12:42 +00:00
block:
2023-12-13 01:43:15 +00:00
- name: Import tasks to create service directory
ansible.builtin.import_tasks: tasks/steps/create-service-directory.yml
2023-12-09 19:12:42 +00:00
- name: Import tasks specific to docker
ansible.builtin.import_tasks: docker.yml
- name: Import tasks specific to systemd
ansible.builtin.import_tasks: systemd.yml
2023-12-09 19:12:42 +00:00
2023-12-13 01:43:15 +00:00
- name: Import tasks create a service.env file
ansible.builtin.import_tasks: tasks/steps/template-service-env.yml
2023-12-09 19:12:42 +00:00
- name: Build service
ansible.builtin.command:
cmd: docker compose build --pull
chdir: "{{ service_path }}"
when:
- "'local-dev' != inventory_hostname"
register: cmd_result
2023-12-13 01:43:15 +00:00
changed_when: true