Josh Disraeli
2020-03-06 615788d483d3f0bc140f4c4d532b59a2686c6047
Appsecjcd (#1245)

* change tasks msg to software from workload

* add connection info to post-workload.yaml

* fix trailing spcs

* fix trailing spcs
1 files modified
50 ■■■■■ changed files
ansible/roles/ocp4-workload-rhsso-foundations/tasks/post_workload.yml 50 ●●●●● patch | view | raw | blame | history
ansible/roles/ocp4-workload-rhsso-foundations/tasks/post_workload.yml
@@ -1,10 +1,60 @@
---
# Implement your Post Workload deployment tasks here
- name: Print no SSH
  debug:
    msg: "user.info: {{ item }}"
  with_items:
    - ""
    - '**********'
    - 'IMPORTANT: You cannot SSH into the shared cluster.'
    - Please refer to the demo or lab instructions in order
    - to get the steps on how to access the environment properly.
    - '**********'
    - ""
- name: Get console route
  command: oc get route -n openshift-console console -o json
  register: routeconsole
  ignore_errors: yes
- name: Set webconsole address
  when: routeconsole is succeeded
  set_fact:
    webconsole: "http://{{ routeconsole.stdout | from_json | json_query('spec.host') }}"
- name: Print Overview
  when: routeconsole is succeeded
  debug:
    msg: "{{ item }}"
  with_items:
    - "user.info: Openshift Master Console: {{ webconsole }}"
- name: Get API for command line
  command: oc whoami --show-server
  register: showserver
  ignore_errors: yes
- name: Print Overview
  when: showserver is succeeded
  debug:
    msg: "user.info: {{ item }}"
  with_items:
    - "Openshift API for command line 'oc' client: {{ showserver.stdout | trim }}"
#
# Leave this as the last task in the playbook.
# For deployment onto a dedicated cluster (as part of the
# cluster deployment) set workload_shared_deployment to False
# This is the default so it does not have to be set explicitely
- name: pre_workload tasks completed
  debug:
    msg: "Post-Workload tasks completed successfully."
  when:
  - not silent|bool
  - not workload_shared_deployment|d(True)
# For RHPDS deployment (onto a shared cluster) set
# workload_shared_deployment to True
# (in the deploy script or AgnosticV configuration)
- name: pre_workload tasks complete
  debug:
    msg: "Post-Workload tasks completed successfully."