blob: 0ca5d1a61f0064947ea13d56b49033b2d2814585 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
---
- import_playbook: ../init/evaluate_groups.yml
- name: Ensure there are new_masters and new_nodes
hosts: localhost
connection: local
gather_facts: no
tasks:
- fail:
# new_masters must be part of new_nodes as well; otherwise if new_nodes
# is not present, oo_nodes_to_config will contain all existing nodes.
msg: >
Detected no new_masters and/or no new_nodes in inventory. New
masters must be part of both new_masters and new_nodes groups.
If you are adding just new_nodes, use the
playbooks/openshift-node/scaleup.yml play.
when: >
g_new_master_hosts | default([]) | length == 0
or g_new_node_hosts | default([]) | length == 0
- name: Ensure there are new_masters and new_nodes
hosts: oo_masters_to_config
connection: local
gather_facts: no
tasks:
- fail:
# new_masters must be part of new_nodes as well;
msg: >
Each host in new_masters must also appear in new_nodes
when: inventory_hostname not in groups['oo_nodes_to_config']
- import_playbook: ../prerequisites.yml
vars:
l_scale_up_hosts: "oo_nodes_to_config:oo_masters_to_config"
l_base_packages_hosts: "oo_nodes_to_config:oo_masters_to_config"
l_init_fact_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config:oo_nodes_to_config"
l_sanity_check_hosts: "{{ groups['oo_nodes_to_config'] | union(groups['oo_masters_to_config']) }}"
- import_playbook: ../init/version.yml
vars:
l_openshift_version_set_hosts: "oo_masters_to_config:oo_nodes_to_config:!oo_first_master"
l_openshift_version_check_hosts: "oo_masters_to_config:oo_nodes_to_config"
- import_playbook: private/scaleup.yml
|