Add OneLab Helm chart, Argo CD Application, and GitOps values for k3s
Made-with: Cursor
This commit is contained in:
23
app/playbooks/tasks/start-db-only.yml
Normal file
23
app/playbooks/tasks/start-db-only.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
# workaround: add a dumb failed condition to avoid any failure here as the service is maybe not installed/existing
|
||||
- name: Check if "docker compose" is available
|
||||
shell: docker compose version
|
||||
become: true
|
||||
register: docker_compose_check
|
||||
failed_when: "'FAILED' in docker_compose_check.stderr"
|
||||
|
||||
- name: Set the compose command to "docker compose"
|
||||
set_fact:
|
||||
compose_command: "docker compose"
|
||||
when: docker_compose_check.rc == 0
|
||||
|
||||
- name: Fallback to "docker-compose" if "docker compose" is not available
|
||||
set_fact:
|
||||
compose_command: "docker-compose"
|
||||
when: docker_compose_check.rc != 0
|
||||
|
||||
- name: Starting database service
|
||||
shell: |
|
||||
{{ compose_command }} -f {{ onelab_path }}/docker-compose.yml up -d db
|
||||
sleep 30
|
||||
become: true
|
||||
Reference in New Issue
Block a user