-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrstudio.yml
45 lines (43 loc) · 1.54 KB
/
rstudio.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
# Provision the infrastructure using Terraform
- name: Provision infrastructure
hosts: openstack
roles:
- cluster_infra
post_tasks:
- name: Wait for RStudio to become available
uri:
url: "http://{{ zenith_fqdn_rstudio }}"
method: GET
follow_redirects: safe
register: rstudio_uri
changed_when: false
# The task fails if there is an error querying the endpoint
# An SSL error is indicated as -1, which will occur while cert-manager fetches certificates
# A 404 is expected until the Zenith service has started
failed_when: >-
rstudio_uri.status < 0 or
rstudio_uri.status == 404 or
rstudio_uri.status >= 500
retries: 180
delay: 10
until: "rstudio_uri is not failed"
when: (cluster_state | default('present')) == 'present'
- name: Wait for Monitoring to become available
uri:
url: "http://{{ zenith_fqdn_monitoring }}"
method: GET
follow_redirects: safe
register: monitoring_uri
changed_when: false
# The task fails if there is an error querying the endpoint
# An SSL error is indicated as -1, which will occur while cert-manager fetches certificates
# A 404 is expected until the Zenith service has started
failed_when: >-
monitoring_uri.status < 0 or
monitoring_uri.status == 404 or
monitoring_uri.status >= 500
retries: 60
delay: 10
until: "monitoring_uri is not failed"
when: (cluster_state | default('present')) == 'present'