openshift_hosted.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ---
  2. - name: Create persistent volumes
  3. hosts: oo_first_master
  4. tags:
  5. - hosted
  6. vars:
  7. persistent_volumes: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volumes(groups) }}"
  8. persistent_volume_claims: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volume_claims }}"
  9. roles:
  10. - role: openshift_persistent_volumes
  11. when: persistent_volumes | length > 0 or persistent_volume_claims | length > 0
  12. - name: Create Hosted Resources
  13. hosts: oo_first_master
  14. tags:
  15. - hosted
  16. pre_tasks:
  17. - set_fact:
  18. openshift_hosted_router_registryurl: "{{ hostvars[groups.oo_first_master.0].openshift.master.registry_url }}"
  19. openshift_hosted_registry_registryurl: "{{ hostvars[groups.oo_first_master.0].openshift.master.registry_url }}"
  20. when: "'master' in hostvars[groups.oo_first_master.0].openshift and 'registry_url' in hostvars[groups.oo_first_master.0].openshift.master"
  21. roles:
  22. - role: openshift_cli
  23. - role: openshift_hosted_facts
  24. - role: openshift_projects
  25. # TODO: Move standard project definitions to openshift_hosted/vars/main.yml
  26. # Vars are not accessible in meta/main.yml in ansible-1.9.x
  27. openshift_projects: "{{ openshift_additional_projects | default({}) | oo_merge_dicts({'default':{'default_node_selector':''},'openshift-infra':{'default_node_selector':''},'logging':{'default_node_selector':''}}) }}"
  28. - role: openshift_serviceaccounts
  29. openshift_serviceaccounts_names:
  30. - router
  31. openshift_serviceaccounts_namespace: default
  32. openshift_serviceaccounts_sccs:
  33. - hostnetwork
  34. when: openshift.common.version_gte_3_2_or_1_2
  35. - role: openshift_serviceaccounts
  36. openshift_serviceaccounts_names:
  37. - router
  38. - registry
  39. openshift_serviceaccounts_namespace: default
  40. openshift_serviceaccounts_sccs:
  41. - privileged
  42. when: not openshift.common.version_gte_3_2_or_1_2
  43. - role: openshift_hosted
  44. - role: openshift_metrics
  45. when: openshift.hosted.metrics.deploy | bool
  46. - role: cockpit-ui
  47. when: ( openshift.common.deployment_subtype == 'registry' )