diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2015-12-19 18:46:48 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2015-12-19 18:46:48 -0500 |
commit | c473a90f4abe887a1a94819e2feac8dcd29dc839 (patch) | |
tree | 9c736326cf4b76e119174d3374c0c63f62d72176 /roles/openshift_serviceaccounts | |
parent | fabc75ca725c6a561bc5e70a63c4dbb2d37bc396 (diff) | |
parent | 48778f29f265380a3e6fa2e882621ebc3781736b (diff) | |
download | openshift-c473a90f4abe887a1a94819e2feac8dcd29dc839.tar.gz openshift-c473a90f4abe887a1a94819e2feac8dcd29dc839.tar.bz2 openshift-c473a90f4abe887a1a94819e2feac8dcd29dc839.tar.xz openshift-c473a90f4abe887a1a94819e2feac8dcd29dc839.zip |
Merge pull request #808 from sdodson/containers
Containerized install with SDN support
Diffstat (limited to 'roles/openshift_serviceaccounts')
-rw-r--r-- | roles/openshift_serviceaccounts/tasks/main.yml | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/roles/openshift_serviceaccounts/tasks/main.yml b/roles/openshift_serviceaccounts/tasks/main.yml index e558a83a2..4c7faa6fe 100644 --- a/roles/openshift_serviceaccounts/tasks/main.yml +++ b/roles/openshift_serviceaccounts/tasks/main.yml @@ -1,12 +1,19 @@ +- name: tmp dir for openshift + file: + path: /tmp/openshift + state: directory + owner: root + mode: 700 + - name: Create service account configs template: src: serviceaccount.j2 - dest: "/tmp/{{ item }}-serviceaccount.yaml" + dest: "/tmp/openshift/{{ item }}-serviceaccount.yaml" with_items: accounts - name: Create {{ item }} service account command: > - {{ openshift.common.client_binary }} create -f "/tmp/{{ item }}-serviceaccount.yaml" + {{ openshift.common.client_binary }} create -f "/tmp/openshift/{{ item }}-serviceaccount.yaml" with_items: accounts register: _sa_result failed_when: "'serviceaccounts \"{{ item }}\" already exists' not in _sa_result.stderr and _sa_result.rc != 0" @@ -15,14 +22,15 @@ - name: Get current security context constraints shell: > {{ openshift.common.client_binary }} get scc privileged -o yaml - --output-version=v1 > /tmp/scc.yaml + --output-version=v1 > /tmp/openshift/scc.yaml + changed_when: false - name: Add security context constraint for {{ item }} lineinfile: - dest: /tmp/scc.yaml + dest: /tmp/openshift/scc.yaml line: "- system:serviceaccount:default:{{ item }}" insertafter: "^users:$" with_items: accounts - name: Apply new scc rules for service accounts - command: "{{ openshift.common.client_binary }} update -f /tmp/scc.yaml --api-version=v1" + command: "{{ openshift.common.client_binary }} update -f /tmp/openshift/scc.yaml --api-version=v1" |