Wolfgang Kulhanek
2018-06-27 10e813ec55023bbf060fc79fa85d0d333e867eba
commit | author | age
e4a951 1 ---
N 2 - name: Add user to developer group (allowed to create projects)
3   command: "oadm groups add-users {{item}} {{ocp_username}}"
4   register: groupadd_register
5   with_items: "{{ocp_user_groups}}"
6   when:
7     - ocp_username is defined
8     - ocp_user_groups | default([]) | length > 0
9
10 - name: test that command worked
11   debug:
12     var: groupadd_register
13     verbosity: 2
14
15 - name: Create user Quota - clusterresourcequota
16   command: |
e6732e 17         oc create clusterresourcequota clusterquota-"{{ocp_username}}-{{guid}}" \
e4a951 18         --project-annotation-selector=openshift.io/requester="{{ocp_username}}" \
N 19         --hard requests.cpu="{{quota_requests_cpu}}" \
20         --hard limits.cpu="{{quota_limits_cpu}}"  \
21         --hard requests.memory="{{quota_requests_memory}}" \
22         --hard limits.memory="{{quota_limits_memory}}" \
23         --hard configmaps="{{quota_configmaps}}" \
24         --hard pods="{{quota_pods}}" \
25         --hard persistentvolumeclaims="{{quota_persistentvolumeclaims}}"  \
26         --hard services="{{quota_services}}" \
27         --hard secrets="{{quota_secrets}}" \
28         --hard requests.storage="{{quota_requests_storage}}"
29   ignore_errors: true
30
b6ef79 31 - name: Allow user view access to gpte-jenkins project
WK 32   command: |
10e813 33         oc policy add-role-to-user view {{ocp_username}} -n {{gpte_jenkins_project}}
b6ef79 34   ignore_errors: true
WK 35
e4a951 36 - name: pre_workload Tasks Complete
N 37   debug:
38     msg: "Pre-Software checks completed successfully"