commit | author | age
|
2282af
|
1 |
--- |
GH |
2 |
# Implement your Pre Workload deployment tasks here |
|
3 |
- name: Fail if _namespace defined |
|
4 |
fail: |
|
5 |
msg: _namespace var is defined. didnt expect that |
|
6 |
when: _namespace is defined |
|
7 |
|
|
8 |
- name: Fail if user count incorrect |
|
9 |
fail: |
|
10 |
msg: User count end({{ user_count_end }}) <= user count start ({{ user_count_start }}) |
|
11 |
when: user_count_end|int <= user_count_start|int |
|
12 |
|
|
13 |
- name: Get oc version |
|
14 |
command: > |
|
15 |
oc version -o json |
|
16 |
register: ocversion |
|
17 |
|
|
18 |
- name: Fail if incorrect oc version |
|
19 |
fail: |
ddd690
|
20 |
msg: "Expected oc server version to be '{{ _ocp_version }}' but found '{{ (ocversion.stdout | from_json).serverVersion.gitVersion }}'" |
GH |
21 |
when: (ocversion.stdout | from_json).serverVersion.gitVersion != _ocp_version |
2282af
|
22 |
|
GH |
23 |
- name: Ensure tmp directory exists |
|
24 |
file: |
|
25 |
path: "{{ tmp_dir }}" |
|
26 |
state: directory |
|
27 |
|
|
28 |
# Leave this as the last task in the playbook. |
|
29 |
- name: pre_workload tasks complete |
|
30 |
debug: |
|
31 |
msg: "Pre-Workload tasks completed successfully." |