Browse Source

Add namespace flag to oc create

Wesley Hearn 9 years ago
parent
commit
bffe6663b7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      roles/openshift_serviceaccounts/tasks/main.yml

+ 2 - 1
roles/openshift_serviceaccounts/tasks/main.yml

@@ -9,7 +9,8 @@
 - name: create the service account
   shell: >
        echo {{ lookup('template', '../templates/serviceaccount.j2')
-               | from_yaml | to_json | quote }} | {{ openshift.common.client_binary }}  create -f -
+               | from_yaml | to_json | quote }}
+               | {{ openshift.common.client_binary }} -n {{ openshift_serviceaccounts_namespace }} create -f -
   when: item.1.rc != 0
   with_together:
   - openshift_serviceaccounts_names