Преглед на файлове

Check and fix registry serviceaccount

Signed-off-by: Gladkov Alexey <agladkov@redhat.com>
Gladkov Alexey преди 7 години
родител
ревизия
2fe4ea7080
променени са 1 файла, в които са добавени 15 реда и са изтрити 0 реда
  1. 15 0
      roles/openshift_hosted/tasks/registry_service_account.yml

+ 15 - 0
roles/openshift_hosted/tasks/registry_service_account.yml

@@ -0,0 +1,15 @@
+---
+- name: create registry serviceaccount
+  oc_serviceaccount:
+    state: present
+    name: "{{ openshift_hosted_registry_serviceaccount }}"
+    namespace: "{{ openshift_hosted_registry_namespace }}"
+  changed_when: no
+
+- name: grant the system:registry role to registry serviceaccount
+  oc_adm_policy_user:
+    state: present
+    namespace: "{{ openshift_hosted_registry_namespace }}"
+    resource_kind: cluster-role
+    resource_name: system:registry
+    user: "system:serviceaccount:{{ openshift_hosted_registry_namespace }}:{{ openshift_hosted_registry_serviceaccount }}"