Add OneLab Helm chart, Argo CD Application, and GitOps values for k3s
Made-with: Cursor
This commit is contained in:
19
app/playbooks/tasks/start-onelab.yml
Normal file
19
app/playbooks/tasks/start-onelab.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Starting OneLab
|
||||
shell: >
|
||||
docker stack deploy onelab --compose-file {{ onelab_path }}/docker-compose.yml --with-registry-auth --prune
|
||||
become: true
|
||||
|
||||
- name: Checking OneLab health status (could take up to 5min to be alive)
|
||||
uri:
|
||||
url: "{{ onelab.domain }}/api/status?token={{ onelab.security.monitoring.token }}"
|
||||
return_content: yes
|
||||
validate_certs: no
|
||||
register: json_response
|
||||
until:
|
||||
- json_response.status == 200
|
||||
- (json_response is defined) and (json_response.content|length > 0)
|
||||
- json_response.content is search('status')
|
||||
- "(json_response.content | from_json).status == 'running'"
|
||||
retries: 60 # 60 * 10 seconds = 10m
|
||||
delay: 10 # Every 10 seconds
|
||||
Reference in New Issue
Block a user