summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-11-13 12:11:13 -0500
committerJason DeTiberus <jdetiber@redhat.com>2015-11-24 13:21:49 -0500
commit6fa3dc760065e622efca6ce33fcf838177bcadff (patch)
treecbcb730a94f8d333665b978245b0274154f9e41d /playbooks/common
parentf464177c264ef87af80ac023e2698a466b723325 (diff)
downloadopenshift-6fa3dc760065e622efca6ce33fcf838177bcadff.tar.gz
openshift-6fa3dc760065e622efca6ce33fcf838177bcadff.tar.bz2
openshift-6fa3dc760065e622efca6ce33fcf838177bcadff.tar.xz
openshift-6fa3dc760065e622efca6ce33fcf838177bcadff.zip
Improve scaleup playbook
- modify evaluate host to set oo_nodes_to_config to a new variable g_new_nodes_group if defined rather than g_nodes_group and also skip adding the master when g_new_nodes_group is set. - Remove byo specific naming from playbooks/common/openshift-cluster/scaleup.yml and created a new playbooks/byo/openshift-cluster/scaleup.yml playbook.
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/evaluate_groups.yml13
-rw-r--r--playbooks/common/openshift-cluster/scaleup.yml8
2 files changed, 9 insertions, 12 deletions
diff --git a/playbooks/common/openshift-cluster/evaluate_groups.yml b/playbooks/common/openshift-cluster/evaluate_groups.yml
index 2bb69614f..34da372a4 100644
--- a/playbooks/common/openshift-cluster/evaluate_groups.yml
+++ b/playbooks/common/openshift-cluster/evaluate_groups.yml
@@ -12,8 +12,8 @@
when: g_masters_group is not defined
- fail:
- msg: This playbook requires g_nodes_group to be set
- when: g_nodes_group is not defined
+ msg: This playbook requires g_nodes_group or g_new_nodes_group to be set
+ when: g_nodes_group is not defined and g_new_nodes_group is not defined
- fail:
msg: This playbook requires g_lb_group to be set
@@ -35,14 +35,19 @@
ansible_sudo: "{{ g_sudo | default(omit) }}"
with_items: groups[g_masters_group] | default([])
+ # Use g_new_nodes_group if it exists otherwise g_nodes_group
+ - set_fact:
+ g_nodes_to_config: "{{ g_new_nodes_group | default(g_nodes_group | default([])) }}"
+
- name: Evaluate oo_nodes_to_config
add_host:
name: "{{ item }}"
groups: oo_nodes_to_config
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
- with_items: groups[g_nodes_group] | default([])
+ with_items: groups[g_nodes_to_config] | default([])
+ # Skip adding the master to oo_nodes_to_config when g_new_nodes_group is
- name: Evaluate oo_nodes_to_config
add_host:
name: "{{ item }}"
@@ -50,7 +55,7 @@
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
with_items: groups[g_masters_group] | default([])
- when: g_nodeonmaster is defined and g_nodeonmaster == true
+ when: g_nodeonmaster | default(false) == true and g_new_nodes_group is not defined
- name: Evaluate oo_first_etcd
add_host:
diff --git a/playbooks/common/openshift-cluster/scaleup.yml b/playbooks/common/openshift-cluster/scaleup.yml
index 6d2777732..e1778e41e 100644
--- a/playbooks/common/openshift-cluster/scaleup.yml
+++ b/playbooks/common/openshift-cluster/scaleup.yml
@@ -1,13 +1,5 @@
---
- include: evaluate_groups.yml
- vars:
- g_etcd_group: "{{ 'etcd' }}"
- g_masters_group: "{{ 'masters' }}"
- g_nodes_group: "{{ 'nodes' }}"
- g_lb_group: "{{ 'lb' }}"
- openshift_cluster_id: "{{ cluster_id | default('default') }}"
- openshift_debug_level: 2
- openshift_deployment_type: "{{ deployment_type }}"
- include: ../openshift-node/config.yml
vars: