scaleup.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ---
  2. - name: Update master count
  3. hosts: oo_masters:!oo_masters_to_config
  4. serial: 1
  5. roles:
  6. - openshift_facts
  7. post_tasks:
  8. - name: Update master count
  9. modify_yaml:
  10. dest: "{{ openshift.common.config_base}}/master/master-config.yaml"
  11. yaml_key: 'kubernetesMasterConfig.masterCount'
  12. yaml_value: "{{ openshift_master_count | default(groups.oo_masters | length) }}"
  13. notify:
  14. - restart master
  15. handlers:
  16. - name: restart master
  17. command: /usr/local/bin/master-restart "{{ item }}"
  18. with_items:
  19. - api
  20. - controllers
  21. notify: verify api server
  22. - name: verify api server
  23. command: >
  24. curl --silent --tlsv1.2 --max-time 2
  25. --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
  26. {{ openshift.master.api_url }}/healthz/ready
  27. args:
  28. # Disables the following warning:
  29. # Consider using get_url or uri module rather than running curl
  30. warn: no
  31. register: api_available_output
  32. until: api_available_output.stdout == 'ok'
  33. retries: 120
  34. delay: 1
  35. changed_when: false
  36. - import_playbook: set_network_facts.yml
  37. - import_playbook: ../../openshift-node/private/bootstrap.yml
  38. - import_playbook: ../../openshift-etcd/private/master_etcd_certificates.yml
  39. - import_playbook: config.yml
  40. - import_playbook: ../../openshift-node/private/join.yml
  41. - import_playbook: ../../openshift-loadbalancer/private/config.yml