openshift_hosted.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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_default_storage_class
  23. when: openshift_cloudprovider_kind is defined and (openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce')
  24. - role: openshift_hosted
  25. - role: openshift_metrics
  26. when: openshift_metrics_install_metrics | default(false) | bool
  27. - role: openshift_logging
  28. when: openshift_logging_install_logging | default(false) | bool
  29. - role: cockpit-ui
  30. when: ( openshift.common.version_gte_3_3_or_1_3 | bool ) and ( openshift_hosted_manage_registry | default(true) | bool ) and not (openshift.docker.hosted_registry_insecure | default(false) | bool)
  31. - role: openshift_prometheus
  32. when: openshift_hosted_prometheus_deploy | default(false) | bool
  33. - name: Update master-config for publicLoggingURL
  34. hosts: oo_masters_to_config:!oo_first_master
  35. tags:
  36. - hosted
  37. pre_tasks:
  38. - set_fact:
  39. openshift_metrics_hawkular_hostname: "{{ g_metrics_hostname | default('hawkular-metrics.' ~ (openshift_master_default_subdomain | default('router.default.svc.cluster.local', true))) }}"
  40. tasks:
  41. - block:
  42. - include_role:
  43. name: openshift_logging
  44. tasks_from: update_master_config
  45. when: openshift_logging_install_logging | default(false) | bool
  46. - block:
  47. - include_role:
  48. name: openshift_metrics
  49. tasks_from: update_master_config
  50. when: openshift_metrics_install_metrics | default(false) | bool