--- # Implement your Workload deployment tasks here - name: "Add user {{ ocp_username }} to groups {{ ocp_user_groups }} to enable creating projects" command: "oc adm groups add-users {{ item }} {{ocp_username}}" with_items: "{{ ocp_user_groups }}" when: - ocp_username is defined - ocp_user_groups | default([]) | length > 0 - name: Create ClusterResourceQuota and allow access to Grading Jenkins k8s: state: present merge_type: - strategic-merge - merge definition: "{{ lookup('template', item ) | from_yaml }}" loop: - ./templates/cluster_resource_quota.j2 - ./templates/jenkins_role_binding.j2 # Leave this as the last task in the playbook. - name: workload tasks complete debug: msg: "Workload Tasks completed successfully." when: not silent|bool