config.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. ---
  2. - name: Master Install Checkpoint Start
  3. hosts: all
  4. gather_facts: false
  5. tasks:
  6. - name: Set Master install 'In Progress'
  7. run_once: true
  8. set_stats:
  9. data:
  10. installer_phase_master:
  11. title: "Master Install"
  12. playbook: "playbooks/openshift-master/config.yml"
  13. status: "In Progress"
  14. start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
  15. - import_playbook: certificates.yml
  16. - name: Disable excluders and gather facts
  17. hosts: oo_masters_to_config
  18. roles:
  19. - openshift_facts
  20. tasks:
  21. - name: Disable excluders
  22. import_role:
  23. name: openshift_excluder
  24. vars:
  25. r_openshift_excluder_action: disable
  26. - openshift_facts:
  27. role: master
  28. local_facts:
  29. api_port: "{{ openshift_master_api_port }}"
  30. api_url: "{{ openshift_master_api_url | default(None) }}"
  31. api_use_ssl: "{{ openshift_master_api_use_ssl | default(None) }}"
  32. controllers_port: "{{ openshift_master_controllers_port | default(None) }}"
  33. public_api_url: "{{ openshift_master_public_api_url | default(None) }}"
  34. cluster_hostname: "{{ openshift_master_cluster_hostname | default(None) }}"
  35. cluster_public_hostname: "{{ openshift_master_cluster_public_hostname | default(None) }}"
  36. console_path: "{{ openshift_master_console_path | default(None) }}"
  37. console_port: "{{ openshift_master_console_port | default(None) }}"
  38. console_url: "{{ openshift_master_console_url | default(None) }}"
  39. console_use_ssl: "{{ openshift_master_console_use_ssl | default(None) }}"
  40. public_console_url: "{{ openshift_master_public_console_url | default(None) }}"
  41. - name: Generate or retrieve existing session secrets
  42. hosts: oo_first_master
  43. roles:
  44. - role: openshift_facts
  45. tasks:
  46. - import_role:
  47. name: openshift_control_plane
  48. tasks_from: generate_session_secrets.yml
  49. - name: Configure masters
  50. hosts: oo_masters_to_config
  51. any_errors_fatal: true
  52. pre_tasks:
  53. - name: Prepare the bootstrap node config on masters for self-hosting
  54. import_role:
  55. name: openshift_node_group
  56. tasks_from: bootstrap.yml
  57. - name: Have the masters automatically pull their configuration
  58. import_role:
  59. name: openshift_node_group
  60. tasks_from: bootstrap_config.yml
  61. roles:
  62. - role: openshift_master_facts
  63. - role: openshift_cloud_provider
  64. when: openshift_cloudprovider_kind is defined
  65. - role: openshift_builddefaults
  66. - role: openshift_buildoverrides
  67. - role: openshift_control_plane
  68. - role: tuned
  69. - role: nuage_common
  70. when: openshift_use_nuage | default(false) | bool
  71. - role: nuage_ca
  72. when: openshift_use_nuage | default(false) | bool
  73. - role: nuage_master
  74. when: openshift_use_nuage | default(false) | bool
  75. - role: calico_master
  76. when: openshift_use_calico | default(false) | bool
  77. tasks:
  78. - import_role:
  79. name: kuryr
  80. tasks_from: master.yaml
  81. when: openshift_use_kuryr | default(false) | bool
  82. - name: setup bootstrap settings
  83. import_tasks: tasks/enable_bootstrap.yml
  84. post_tasks:
  85. - name: Create group for deployment type
  86. group_by: key=oo_masters_deployment_type_{{ openshift_deployment_type }}
  87. changed_when: False
  88. - name: Re-enable excluders
  89. import_role:
  90. name: openshift_excluder
  91. vars:
  92. r_openshift_excluder_action: enable
  93. - name: Deploy the central bootstrap configuration
  94. hosts: oo_first_master
  95. gather_facts: no
  96. tasks:
  97. - name: setup bootstrap settings
  98. import_tasks: tasks/enable_bootstrap_config.yml
  99. - name: setup automatic node config reconcilation
  100. run_once: True
  101. import_role:
  102. name: openshift_node_group
  103. tasks_from: sync.yml
  104. - name: Ensure inventory labels are assigned to masters
  105. hosts: oo_masters_to_config
  106. gather_facts: no
  107. roles:
  108. - role: openshift_manage_node
  109. openshift_master_host: "{{ groups.oo_first_master.0 }}"
  110. openshift_manage_node_is_master: "{{ ('oo_masters_to_config' in group_names) | bool }}"
  111. openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
  112. - name: Master Install Checkpoint End
  113. hosts: all
  114. gather_facts: false
  115. tasks:
  116. - name: Set Master install 'Complete'
  117. run_once: true
  118. set_stats:
  119. data:
  120. installer_phase_master:
  121. status: "Complete"
  122. end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"