summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/scaleup.yml
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-02-03 13:51:27 -0500
committerAndrew Butcher <abutcher@redhat.com>2016-02-16 14:18:01 -0500
commit6d3e1764658582150f6c776c2662075531ccf70f (patch)
treee48c1f87af4bb157b0ce752ac022af6262cb8924 /playbooks/common/openshift-cluster/scaleup.yml
parentcc5c39cac2f9514df96b1922ad1cfc954ae1c0b9 (diff)
downloadopenshift-6d3e1764658582150f6c776c2662075531ccf70f.tar.gz
openshift-6d3e1764658582150f6c776c2662075531ccf70f.tar.bz2
openshift-6d3e1764658582150f6c776c2662075531ccf70f.tar.xz
openshift-6d3e1764658582150f6c776c2662075531ccf70f.zip
Add new_masters to scaleup playbook.
Diffstat (limited to 'playbooks/common/openshift-cluster/scaleup.yml')
-rw-r--r--playbooks/common/openshift-cluster/scaleup.yml40
1 files changed, 39 insertions, 1 deletions
diff --git a/playbooks/common/openshift-cluster/scaleup.yml b/playbooks/common/openshift-cluster/scaleup.yml
index c4340902b..e4b4564d8 100644
--- a/playbooks/common/openshift-cluster/scaleup.yml
+++ b/playbooks/common/openshift-cluster/scaleup.yml
@@ -12,5 +12,43 @@
- openshift_docker
- include: ../openshift-node/config.yml
+
+- name: Gather facts
+ hosts: oo_etcd_to_config:oo_masters_to_config:oo_nodes_to_config
+ roles:
+ - openshift_facts
+
+- name: Update master count
+ hosts: oo_masters:!oo_masters_to_config
+ serial: 1
vars:
- openshift_deployment_type: "{{ deployment_type }}"
+ openshift_master_count: "{{ groups.oo_masters | length }}"
+ roles:
+ - openshift_facts
+ post_tasks:
+ - name: Update master count
+ lineinfile:
+ dest: "{{ openshift.common.config_base}}/master/master-config.yaml"
+ regexp: '^ masterCount:.*$'
+ line: " masterCount: {{ openshift_master_count }}"
+ register: master_config
+ - name: Restart master api
+ service: name={{ openshift.common.service_type }}-master-api state=restarted
+ when: master_config | changed
+ notify: Verify api server
+ - name: restart master controllers
+ service: name={{ openshift.common.service_type }}-master-controllers state=restarted
+ when: master_config | changed
+ handlers:
+ - name: Verify api server
+ command: >
+ curl -k --head --silent {{ openshift.master.api_url }}
+ register: api_available_output
+ until: api_available_output.stdout.find("200 OK") != -1
+ retries: 120
+ delay: 1
+ changed_when: false
+
+- include: ../openshift-master/config.yml
+
+- include: ../openshift-node/config.yml