|
@@ -1,16 +1,9 @@
|
|
|
---
|
|
|
-- name: Check for provisioners project already exists
|
|
|
- command: >
|
|
|
- {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get project {{openshift_provisioners_project}} --no-headers
|
|
|
- register: provisioners_project_result
|
|
|
- ignore_errors: yes
|
|
|
- when: not ansible_check_mode
|
|
|
- changed_when: no
|
|
|
-
|
|
|
-- name: Create provisioners project
|
|
|
- command: >
|
|
|
- {{ openshift.common.admin_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig new-project {{openshift_provisioners_project}}
|
|
|
- when: not ansible_check_mode and "not found" in provisioners_project_result.stderr
|
|
|
+- name: Set provisioners project
|
|
|
+ oc_project:
|
|
|
+ state: present
|
|
|
+ kubeconfig: "{{ mktemp.stdout }}/admin.kubeconfig"
|
|
|
+ name: "{{ openshift_provisioners_project }}"
|
|
|
|
|
|
- name: Create temp directory for all our templates
|
|
|
file: path={{mktemp.stdout}}/templates state=directory mode=0755
|