forked from redhat-cop/agnosticd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pre_workload.yml
32 lines (28 loc) · 1.2 KB
/
pre_workload.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
- name: Add user to developer group (allowed to create projects)
shell: "oc adm groups add-users {{item}} {{ocp_username}}"
register: groupadd_register
with_items: "{{ocp_user_groups}}"
when: ocp_username is defined and ocp_user_groups is defined
- name: test that command worked
debug:
var: groupadd_register
verbosity: 2
- name: Create user Quota - clusterresourcequota
shell: |
oc create clusterquota clusterquota-"{{ocp_username}}-{{guid}}" \
--project-annotation-selector=openshift.io/requester="{{ocp_username}}" \
--hard requests.cpu="{{quota_requests_cpu}}" \
--hard limits.cpu="{{quota_limits_cpu}}" \
--hard requests.memory="{{quota_requests_memory}}" \
--hard limits.memory="{{quota_limits_memory}}" \
--hard configmaps="{{quota_configmaps}}" \
--hard pods="{{quota_pods}}" \
--hard persistentvolumeclaims="{{quota_persistentvolumeclaims}}" \
--hard services="{{quota_services}}" \
--hard secrets="{{quota_secrets}}" \
--hard requests.storage="{{quota_requests_storage}}"
ignore_errors: true
- name: pre_workload Tasks Complete
debug:
msg: "Pre-Software checks completed successfully"