commit | author | age
|
1bbb1c
|
1 |
--- |
RJ |
2 |
- environment: |
|
3 |
KUBECONFIG: "{{ tmp_kubeconfig }}" |
|
4 |
block: |
|
5 |
- name: Verify user can create projects |
|
6 |
command: "oc auth can-i create project" |
|
7 |
register: canicreateprojects |
|
8 |
failed_when: canicreateprojects.stdout != 'yes' |
|
9 |
|
|
10 |
- name: Check if user workshop project exists |
|
11 |
shell: "oc get project {{user_project_name}}" |
|
12 |
register: workshop_project |
|
13 |
ignore_errors: true |
|
14 |
|
|
15 |
- name: Create project for user workshop if it doesn't exist |
|
16 |
shell: "oc new-project {{user_project_name}} --display-name='user workshop'" |
|
17 |
when: workshop_project is failed |
|
18 |
|
|
19 |
- name: Git clone the repo if it doesn't exist |
316ea9
|
20 |
command: git clone --branch v1.1 https://github.com/openshift-labs/lab-build-your-own-operator {{ tmp_git_location }} |
1bbb1c
|
21 |
args: |
RJ |
22 |
creates: "{{ tmp_git_location }}" |
|
23 |
|
316ea9
|
24 |
- name: Create deployment, chdir first |
1bbb1c
|
25 |
command: "{{ tmp_git_location }}/.workshop/scripts/deploy-spawner.sh" |
316ea9
|
26 |
args: |
JK |
27 |
chdir: "{{ tmp_git_location }}" |
|
28 |
|
1bbb1c
|
29 |
- name: workload Tasks Complete |
RJ |
30 |
debug: |
|
31 |
msg: workload Tasks Complete |