diff options
author | Matthew Wong <mawong@redhat.com> | 2017-06-23 10:51:30 -0400 |
---|---|---|
committer | Matthew Wong <mawong@redhat.com> | 2017-10-27 23:14:22 -0400 |
commit | 9a2438c1274abf22c21d42a04450bbb9e733deb5 (patch) | |
tree | 1d0a4b1f695e52ac9a1ec54f2df90b64eae94c79 | |
parent | 1e7b4305ccba6197992449bb756de98bc824ea26 (diff) | |
download | openshift-9a2438c1274abf22c21d42a04450bbb9e733deb5.tar.gz openshift-9a2438c1274abf22c21d42a04450bbb9e733deb5.tar.bz2 openshift-9a2438c1274abf22c21d42a04450bbb9e733deb5.tar.xz openshift-9a2438c1274abf22c21d42a04450bbb9e733deb5.zip |
Use oc_project to ensure openshift_provisioners_project present
-rw-r--r-- | roles/openshift_provisioners/tasks/install_support.yaml | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/roles/openshift_provisioners/tasks/install_support.yaml b/roles/openshift_provisioners/tasks/install_support.yaml index ba472f1c9..d6db81ab9 100644 --- a/roles/openshift_provisioners/tasks/install_support.yaml +++ b/roles/openshift_provisioners/tasks/install_support.yaml @@ -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 |