summaryrefslogtreecommitdiffstats
path: root/roles/openshift_manageiq
diff options
context:
space:
mode:
authorSteve Milner <smilner@redhat.com>2017-02-09 11:57:57 -0500
committerSteve Milner <smilner@redhat.com>2017-02-10 12:52:36 -0500
commitbadaa6dc09abfcbfb2770a2d2070c803a2aaaf03 (patch)
treee78d40748a2e1237e6fc9cfc2bede800d7f7c6b0 /roles/openshift_manageiq
parent07ca54fe406a533e70350aa9273d5a3df297f156 (diff)
downloadopenshift-badaa6dc09abfcbfb2770a2d2070c803a2aaaf03.tar.gz
openshift-badaa6dc09abfcbfb2770a2d2070c803a2aaaf03.tar.bz2
openshift-badaa6dc09abfcbfb2770a2d2070c803a2aaaf03.tar.xz
openshift-badaa6dc09abfcbfb2770a2d2070c803a2aaaf03.zip
oc serviceaccount now done via oc_serviceaccount module
Diffstat (limited to 'roles/openshift_manageiq')
-rw-r--r--roles/openshift_manageiq/meta/main.yml15
-rw-r--r--roles/openshift_manageiq/tasks/main.yaml30
-rw-r--r--roles/openshift_manageiq/vars/main.yml13
3 files changed, 25 insertions, 33 deletions
diff --git a/roles/openshift_manageiq/meta/main.yml b/roles/openshift_manageiq/meta/main.yml
new file mode 100644
index 000000000..6c96a91bf
--- /dev/null
+++ b/roles/openshift_manageiq/meta/main.yml
@@ -0,0 +1,15 @@
+---
+galaxy_info:
+ author: Erez Freiberger
+ description: ManageIQ
+ company: Red Hat, Inc.
+ license: Apache License, Version 2.0
+ min_ansible_version: 2.1
+ platforms:
+ - name: EL
+ versions:
+ - 7
+ categories:
+ - cloud
+dependencies:
+- role: lib_openshift
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: >
diff --git a/roles/openshift_manageiq/vars/main.yml b/roles/openshift_manageiq/vars/main.yml
index 3f24fd6be..9936bb126 100644
--- a/roles/openshift_manageiq/vars/main.yml
+++ b/roles/openshift_manageiq/vars/main.yml
@@ -1,4 +1,5 @@
---
+openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
manageiq_cluster_role:
apiVersion: v1
kind: ClusterRole
@@ -24,18 +25,6 @@ manageiq_metrics_admin_clusterrole:
verbs:
- '*'
-manageiq_service_account:
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: management-admin
-
-manageiq_image_inspector_service_account:
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: inspector-admin
-
manage_iq_tmp_conf: /tmp/manageiq_admin.kubeconfig
manage_iq_tasks: