Browse Source

Add no_proxy to verify to check .svc

This patch changees:

- to add no_proxy option to verify the url `*.svc`.
- to use uri module to consistent with start_api_server.yml.
Kenjiro Nakayama 7 years ago
parent
commit
f2d0a0569a

+ 7 - 7
roles/openshift_web_console/tasks/start.yml

@@ -1,13 +1,13 @@
 ---
 - name: Verify that the web console is running
-  command: >
-    curl -k https://webconsole.openshift-web-console.svc/healthz
-  args:
-    # Disables the following warning:
-    # Consider using get_url or uri module rather than running curl
-    warn: no
+  uri:
+    url: https://webconsole.openshift-web-console.svc/healthz
+    validate_certs: no
+    return_content: yes
+  environment:
+    no_proxy: '*'
   register: endpoint_health
-  until: endpoint_health.stdout == 'ok'
+  until: "'ok' in endpoint_health.content"
   retries: 60
   delay: 10
   changed_when: false

+ 7 - 7
roles/template_service_broker/tasks/deploy.yml

@@ -50,14 +50,14 @@
 
 # Check that the TSB is running
 - name: Verify that TSB is running
-  command: >
-    curl -k https://apiserver.openshift-template-service-broker.svc/healthz
-  args:
-    # Disables the following warning:
-    # Consider using get_url or uri module rather than running curl
-    warn: no
+  uri:
+    url: https://apiserver.openshift-template-service-broker.svc/healthz
+    validate_certs: no
+    return_content: yes
+  environment:
+    no_proxy: '*'
   register: api_health
-  until: api_health.stdout == 'ok'
+  until: "'ok' in api_health.content"
   retries: 60
   delay: 10
   changed_when: false