summaryrefslogtreecommitdiffstats
path: root/roles/openshift_manageiq/tasks
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-02-11 10:32:29 +0100
committerGitHub <noreply@github.com>2017-02-11 10:32:29 +0100
commit3921f01be97ccfbb54e11666ce3647774c3fdbb9 (patch)
treefb49743460566722c42b30ec297f2f4e19d4a1eb /roles/openshift_manageiq/tasks
parent5444c0f474f3701f22ae8392d1ac192403c8b5b7 (diff)
parentbadaa6dc09abfcbfb2770a2d2070c803a2aaaf03 (diff)
downloadopenshift-3921f01be97ccfbb54e11666ce3647774c3fdbb9.tar.gz
openshift-3921f01be97ccfbb54e11666ce3647774c3fdbb9.tar.bz2
openshift-3921f01be97ccfbb54e11666ce3647774c3fdbb9.tar.xz
openshift-3921f01be97ccfbb54e11666ce3647774c3fdbb9.zip
Merge pull request #3321 from ashcrow/oc-serviceaccount-module
WIP: oc serviceaccount now done via oc_serviceaccount module
Diffstat (limited to 'roles/openshift_manageiq/tasks')
-rw-r--r--roles/openshift_manageiq/tasks/main.yaml30
1 files changed, 9 insertions, 21 deletions
diff --git a/roles/openshift_manageiq/tasks/main.yaml b/roles/openshift_manageiq/tasks/main.yaml
index a7214482f..e58947fd2 100644
--- a/roles/openshift_manageiq/tasks/main.yaml
+++ b/roles/openshift_manageiq/tasks/main.yaml
@@ -18,27 +18,15 @@
failed_when: "'already exists' not in osmiq_create_mi_project.stderr and osmiq_create_mi_project.rc != 0"
changed_when: osmiq_create_mi_project.rc == 0
-- name: Create Admin Service Account
- shell: >
- echo {{ manageiq_service_account | to_json | quote }} |
- {{ openshift.common.client_binary }} create
- -n management-infra
- --config={{manage_iq_tmp_conf}}
- -f -
- register: osmiq_create_service_account
- failed_when: "'already exists' not in osmiq_create_service_account.stderr and osmiq_create_service_account.rc != 0"
- changed_when: osmiq_create_service_account.rc == 0
-
-- name: Create Image Inspector Service Account
- shell: >
- echo {{ manageiq_image_inspector_service_account | to_json | quote }} |
- {{ openshift.common.client_binary }} create
- -n management-infra
- --config={{manage_iq_tmp_conf}}
- -f -
- register: osmiq_create_service_account
- failed_when: "'already exists' not in osmiq_create_service_account.stderr and osmiq_create_service_account.rc != 0"
- changed_when: osmiq_create_service_account.rc == 0
+- name: Create Admin and Image Inspector Service Account
+ oc_serviceaccount:
+ kubeconfig: "{{ openshift_master_config_dir }}/admin.kubeconfig"
+ name: "{{ item }}"
+ namespace: management-infra
+ state: present
+ with_items:
+ - management-admin
+ - inspector-admin
- name: Create Cluster Role
shell: >