|
@@ -2,37 +2,11 @@
|
|
|
- name: Update master count
|
|
|
hosts: oo_masters:!oo_masters_to_config
|
|
|
serial: 1
|
|
|
- roles:
|
|
|
- - openshift_facts
|
|
|
- post_tasks:
|
|
|
+ tasks:
|
|
|
- name: Update master count
|
|
|
- modify_yaml:
|
|
|
- dest: "{{ openshift.common.config_base}}/master/master-config.yaml"
|
|
|
- yaml_key: 'kubernetesMasterConfig.masterCount'
|
|
|
- yaml_value: "{{ openshift_master_count | default(groups.oo_masters | length) }}"
|
|
|
- notify:
|
|
|
- - restart master
|
|
|
- handlers:
|
|
|
- - name: restart master
|
|
|
- command: /usr/local/bin/master-restart "{{ item }}"
|
|
|
- with_items:
|
|
|
- - api
|
|
|
- - controllers
|
|
|
- notify: verify api server
|
|
|
- - name: verify api server
|
|
|
- command: >
|
|
|
- curl --silent --tlsv1.2 --max-time 2
|
|
|
- --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
|
|
|
- {{ openshift.master.api_url }}/healthz/ready
|
|
|
- args:
|
|
|
- # Disables the following warning:
|
|
|
- # Consider using get_url or uri module rather than running curl
|
|
|
- warn: no
|
|
|
- register: api_available_output
|
|
|
- until: api_available_output.stdout == 'ok'
|
|
|
- retries: 120
|
|
|
- delay: 1
|
|
|
- changed_when: false
|
|
|
+ import_role:
|
|
|
+ name: openshift_control_plane
|
|
|
+ tasks_from: update_master_count.yml
|
|
|
|
|
|
- import_playbook: ../../openshift-node/private/bootstrap.yml
|
|
|
|