-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
082a311
commit 486befc
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
automation-roles/80-smoke-tests/openshift-smoke-tests/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- name: Login to the OpenShift cluster {{ _current_openshift_cluster.name }} | ||
include_role: | ||
name: openshift-login | ||
vars: | ||
_p_openshift_cluster_name: "{{ _current_openshift_cluster.name }}" | ||
|
||
- name: Output OpenShift URLs and passwords | ||
include_tasks: openshift-show-details.yml |
40 changes: 40 additions & 0 deletions
40
automation-roles/80-smoke-tests/openshift-smoke-tests/tasks/openshift-show-details.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
- name: Get kubeadmin password {rom the vault | ||
include_role: | ||
name: vault-get-secret | ||
vars: | ||
secret_name: "{{ _current_openshift_cluster.name }}-kubeadmin-password" | ||
secret_group: "{{ environment_name }}" | ||
_p_secret_variable: _kubeadmin_password | ||
|
||
- name: Get oc-login secret | ||
include_role: | ||
name: vault-get-secret | ||
vars: | ||
secret_name: oc-login | ||
secret_group: "{{ environment_name }}" | ||
_p_secret_variable: _oc_login_secret | ||
|
||
- name: Get OpenShift Console endpoint | ||
shell: | | ||
oc whoami --show-console | ||
register: _openshift_console_endpoint | ||
|
||
- name: Get OpenShift API endpoint | ||
shell: | | ||
oc whoami --show-server | ||
register: _openshift_api_endpoint | ||
|
||
- name: Make sure that directory {{ status_dir }}/cloud-paks exists | ||
file: | ||
path: "{{ status_dir }}/cloud-paks" | ||
state: directory | ||
|
||
- name: Write Cloud Pak for Data info to {{ status_dir }}/cloud-paks/cloud-pak-deployer-info.txt | ||
blockinfile: | ||
path: "{{ status_dir }}/cloud-paks/cloud-pak-deployer-info.txt" | ||
create: True | ||
insertafter: EOF | ||
marker: "" | ||
block: | | ||
{{ lookup('template','openshift-details.j2') }} |
9 changes: 9 additions & 0 deletions
9
automation-roles/80-smoke-tests/openshift-smoke-tests/templates/openshift-details.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- OpenShift cluster {{ _current_openshift_cluster.name }} --- | ||
OpenShift Console URL: {{ _openshift_console_endpoint.stdout }} | ||
OpenShift API endpoint: {{ _openshift_api_endpoint.stdout }} | ||
{% if _kubeadmin_password | default('') != '' %} | ||
kubeadmin password: {{ _kubeadmin_password }} | ||
{% endif %} | ||
{% if _oc_login_secret | default('') != '' %} | ||
OpenShift login: {{ _oc_login_secret }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters