Browse Source

Add oc_adm_policy_user task cluster-role policy

Russell Teague 8 years ago
parent
commit
33bc830837
1 changed files with 7 additions and 0 deletions
  1. 7 0
      roles/openshift_hosted/tasks/registry/registry.yml

+ 7 - 0
roles/openshift_hosted/tasks/registry/registry.yml

@@ -56,6 +56,13 @@
     openshift_hosted_registry_force:
     - False
 
+- name: oc adm policy add-cluster-role-to-user system:registry system:serviceaccount:default:registry
+  oc_adm_policy_user:
+    user: system:serviceaccount:default:registry
+    resource_kind: cluster-role
+    resource_name: system:registry
+    state: present
+
 - name: create the default registry service
   oc_service:
     namespace: "{{ openshift_hosted_registry_namespace }}"