serviceaccount.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. - name: Create Admin Service Account
  3. oc_serviceaccount:
  4. name: nuage
  5. namespace: default
  6. state: present
  7. run_once: True
  8. delegate_to: "{{ nuage_ca_master }}"
  9. - name: Configure role/user permissions
  10. oc_adm_policy_user:
  11. namespace: default
  12. resource_name: "{{ item.resource_name }}"
  13. resource_kind: "{{ item.resource_kind }}"
  14. user: "{{ item.user }}"
  15. with_items: "{{ nuage_tasks }}"
  16. run_once: True
  17. delegate_to: "{{ nuage_ca_master }}"
  18. - name: Generate the node client config
  19. command: >
  20. {{ openshift_client_binary }} adm create-api-client-config
  21. --certificate-authority={{ openshift_master_ca_cert }}
  22. --client-dir={{ cert_output_dir }}
  23. --master={{ openshift.master.api_url }}
  24. --public-master={{ openshift.master.api_url }}
  25. --signer-cert={{ openshift_master_ca_cert }}
  26. --signer-key={{ openshift_master_ca_key }}
  27. --signer-serial={{ openshift_master_ca_serial }}
  28. --basename='nuage'
  29. --user={{ nuage_service_account }}
  30. delegate_to: "{{ nuage_ca_master }}"
  31. run_once: True