1
0
mirror of https://github.com/openshift/openshift-ansible.git synced 2026-02-05 15:45:57 +01:00

Add test playbooks to verify new RHEL nodes can be added to AWS RHCOS

cluster
This commit is contained in:
Vadim Rutkovsky
2019-01-10 11:48:34 +01:00
parent dbb24ca8d5
commit e10cc17253
16 changed files with 345 additions and 376 deletions

View File

@@ -1,6 +1,4 @@
---
- import_playbook: ../init/evaluate_groups.yml
- name: Ensure there are new_nodes
hosts: localhost
connection: local
@@ -8,32 +6,22 @@
tasks:
- fail:
msg: >
Detected no new_nodes in inventory. Please add hosts to the
new_nodes host group to add nodes.
Detected no new_workers in inventory. Please add hosts to the
new_workers host group to add nodes.
when:
- g_new_node_hosts | default([]) | length == 0
- fail:
msg: >
Please run playbooks/openshift-master/scaleup.yml if you need to
scale up both masters and nodes. This playbook is only needed if
you are only adding new nodes and not new masters.
when:
- g_new_node_hosts | default([]) | length > 0
- g_new_master_hosts | default([]) | length > 0
# if g_new_node_hosts is not empty, oo_nodes_to_config will be set to
# g_new_node_hosts via evaluate_groups.yml
- groups.new_workers | default([]) | length == 0
- name: run the init
import_playbook: ../init/main.yml
vars:
l_init_fact_hosts: "masters:new_nodes"
l_openshift_version_set_hosts: "new_nodes"
l_init_fact_hosts: "new_workers"
l_openshift_version_set_hosts: "new_workers"
l_install_base_packages: True
l_repo_hosts: "new_nodes"
l_repo_hosts: "new_workers"
l_base_packages_hosts: "new_workers"
- name: install nodes
hosts: new_nodes
hosts: new_workers
vars:
openshift_bootstrap_endpoint: "https://{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:49500/config/worker"
roles:
@@ -51,12 +39,6 @@
- import_role:
name: openshift_node40
tasks_from: install.yml
- name: Start workers
hosts: new_nodes
vars:
openshift_bootstrap_endpoint: "https://{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:49500/config/worker"
tasks:
- name: Wait for bootstrap endpoint to show up
uri:
url: "{{ openshift_bootstrap_endpoint }}"