--- - name: Setting up workload for user debug: msg: "Setting up workload for user ocp_username = {{ ocp_username }}" - name: Make sure target project {{ project_name }} exists. If not, create it. k8s: state: present kind: Project api_version: project.openshift.io/v1 definition: metadata: name: "{{ project_name }}" annotations: openshift.io/description: "" openshift.io/display-name: "OpenShift 4 Developer Tools & Services Workshop" ignore_errors: yes - name: Set user project command: "oc project {{ project_name }}" - name: Git clone the repo if it doesn't exist git: repo: "{{ lab_repo }}" version: "{{ lab_branch }}" dest: "{{ tmp_git_location }}" track_submodules: yes - name: Create deployment, chdir first command: "{{ tmp_git_location }}/.workshop/scripts/deploy-spawner.sh --override SERVER_LIMIT=0 --override PREPULL_IMAGES=true --override CLEAN_INSTALL=true" retries: 10 delay: 30 register: result until: result is not failed args: chdir: "{{ tmp_git_location }}" - name: Show deploy workshop regular output debug: var: result.stdout_lines when: result.stdout_lines is defined and result.stdout_lines | length > 0 - name: Show deploy workshop error output debug: var: result.stderr_lines when: result.stderr_lines is defined and result.stderr_lines | length > 0 # Leave this as the last task in the playbook. - name: workload tasks complete debug: msg: "Workload Tasks completed successfully." when: not silent|bool