| | |
| | | --- |
| | | |
| | | # ######### Default project ############## |
| | | #- name: Create project for workload; project = {{ocp_project}} |
| | | # shell: "oc new-project {{ocp_project}}" |
| | | |
| | | #- name: "Label namespace" |
| | | # command: "oc label namespace {{ocp_project}} AAD='{{guid}}'" |
| | | |
| | | #- name: Make sure we go back do default project |
| | | # shell: "oc project default" |
| | | |
| | | #- name: Delete default limitrange |
| | | # shell: | |
| | | # oc delete limitrange {{ocp_project}}-core-resource-limits -n {{ocp_project}} |
| | | |
| | | #- name: Create a new limitrange |
| | | # template: |
| | | # src: templates/limitrange.yaml |
| | | # dest: /tmp/{{ocp_project}}_limitrange.yaml |
| | | #- shell: | |
| | | # oc create -f /tmp/{{ocp_project}}_limitrange.yaml -n {{ocp_project}} |
| | | |
| | | # ############################################################### |
| | | |
| | | |
| | | |
| | | # ######### Constraint project ############## |
| | | |
| | |
| | | - name: Give ocp_username access to {{ocp_constraints_project}}; user = {{ocp_username}} |
| | | shell: "oc policy add-role-to-user admin {{ocp_username}} -n {{ocp_constraints_project}}" |
| | | |
| | | # Note; depending on the environment, OCP projects may or may not have default limit ranges |
| | | - name: Delete default limitrange |
| | | shell: | |
| | | oc delete limitrange {{ocp_constraints_project}}-core-resource-limits -n {{ocp_constraints_project}} |
| | | ignore_errors: true |
| | | |
| | | - name: Create a new limitrange |
| | | template: |