openshift_hosted.yml 1.9 KB

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