
after running browbeat tests, the newly added ansible script is invoked and the ocp metrics from prometheus are fetched and indexed in given ES. the indexing is leveraging kube-burner Change-Id: Ic193ee023c44ecc7f750a2cfbb77327c79baed82
23 lines
491 B
YAML
23 lines
491 B
YAML
---
|
|
- name: Check if oc is installed
|
|
shell: "which oc"
|
|
register: oc_location
|
|
ignore_errors: true
|
|
|
|
- name: Fail if oc is not installed
|
|
fail:
|
|
msg: "oc is not installed"
|
|
when: oc_location.rc != 0
|
|
|
|
- name: Check if logged into Kubernetes cluster
|
|
shell: "oc version"
|
|
register: oc_version
|
|
ignore_errors: true
|
|
environment:
|
|
KUBECONFIG: "{{ kubeconfig_path }}"
|
|
|
|
- name: Fail if not logged in
|
|
fail:
|
|
msg: "Not logged in to Kubernetes cluster"
|
|
when: oc_version.rc != 0
|