summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/config.yml10
-rw-r--r--playbooks/common/openshift-cluster/openshift_metrics.yml38
-rw-r--r--playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml6
-rw-r--r--playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/backup.yml1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml66
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml1
-rw-r--r--playbooks/common/openshift-etcd/ca.yml15
-rw-r--r--playbooks/common/openshift-etcd/certificates.yml4
-rw-r--r--playbooks/common/openshift-etcd/config.yml40
-rw-r--r--playbooks/common/openshift-etcd/embedded2external.yml172
l---------playbooks/common/openshift-etcd/filter_plugins1
l---------playbooks/common/openshift-etcd/lookup_plugins1
-rw-r--r--playbooks/common/openshift-etcd/master_etcd_certificates.yml14
-rw-r--r--playbooks/common/openshift-etcd/migrate.yml169
-rw-r--r--playbooks/common/openshift-etcd/restart.yml27
l---------playbooks/common/openshift-etcd/roles1
-rw-r--r--playbooks/common/openshift-etcd/scaleup.yml83
-rw-r--r--playbooks/common/openshift-etcd/server_certificates.yml15
-rw-r--r--playbooks/common/openshift-loadbalancer/config.yml51
l---------playbooks/common/openshift-loadbalancer/filter_plugins1
l---------playbooks/common/openshift-loadbalancer/lookup_plugins1
l---------playbooks/common/openshift-loadbalancer/roles1
-rw-r--r--playbooks/common/openshift-master/scaleup.yml8
-rw-r--r--playbooks/common/openshift-nfs/config.yml30
l---------playbooks/common/openshift-nfs/filter_plugins1
l---------playbooks/common/openshift-nfs/lookup_plugins1
l---------playbooks/common/openshift-nfs/roles1
-rw-r--r--playbooks/common/openshift-node/additional_config.yml64
-rw-r--r--playbooks/common/openshift-node/certificates.yml8
-rw-r--r--playbooks/common/openshift-node/clean_image.yml10
-rw-r--r--playbooks/common/openshift-node/config.yml38
-rw-r--r--playbooks/common/openshift-node/configure_nodes.yml17
-rw-r--r--playbooks/common/openshift-node/containerized_nodes.yml19
-rw-r--r--playbooks/common/openshift-node/enable_excluders.yml8
-rw-r--r--playbooks/common/openshift-node/etcd_client_config.yml11
l---------playbooks/common/openshift-node/filter_plugins1
-rw-r--r--playbooks/common/openshift-node/image_prep.yml21
l---------playbooks/common/openshift-node/lookup_plugins1
-rw-r--r--playbooks/common/openshift-node/manage_node.yml12
-rw-r--r--playbooks/common/openshift-node/network_manager.yml28
-rw-r--r--playbooks/common/openshift-node/restart.yml61
l---------playbooks/common/openshift-node/roles1
-rw-r--r--playbooks/common/openshift-node/setup.yml27
45 files changed, 23 insertions, 1066 deletions
diff --git a/playbooks/common/openshift-cluster/config.yml b/playbooks/common/openshift-cluster/config.yml
index 588291878..fce5b652d 100644
--- a/playbooks/common/openshift-cluster/config.yml
+++ b/playbooks/common/openshift-cluster/config.yml
@@ -1,26 +1,26 @@
---
- include: ../../openshift-checks/private/install.yml
-- include: ../openshift-etcd/config.yml
+- include: ../../openshift-etcd/private/config.yml
-- include: ../openshift-nfs/config.yml
+- include: ../../openshift-nfs/private/config.yml
when: groups.oo_nfs_to_config | default([]) | count > 0
-- include: ../openshift-loadbalancer/config.yml
+- include: ../../openshift-loadbalancer/private/config.yml
when: groups.oo_lb_to_config | default([]) | count > 0
- include: ../openshift-master/config.yml
- include: ../openshift-master/additional_config.yml
-- include: ../openshift-node/config.yml
+- include: ../../openshift-node/private/config.yml
- include: ../openshift-glusterfs/config.yml
when: groups.oo_glusterfs_to_config | default([]) | count > 0
- include: openshift_hosted.yml
-- include: openshift_metrics.yml
+- include: ../../openshift-metrics/private/config.yml
when: openshift_metrics_install_metrics | default(false) | bool
- include: openshift_logging.yml
diff --git a/playbooks/common/openshift-cluster/openshift_metrics.yml b/playbooks/common/openshift-cluster/openshift_metrics.yml
deleted file mode 100644
index 80cd93e5f..000000000
--- a/playbooks/common/openshift-cluster/openshift_metrics.yml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- name: Metrics Install Checkpoint Start
- hosts: all
- gather_facts: false
- tasks:
- - name: Set Metrics install 'In Progress'
- run_once: true
- set_stats:
- data:
- installer_phase_metrics:
- status: "In Progress"
- start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
-
-- name: OpenShift Metrics
- hosts: oo_first_master
- roles:
- - role: openshift_metrics
-
-- name: OpenShift Metrics
- hosts: oo_masters:!oo_first_master
- serial: 1
- tasks:
- - name: Setup the non-first masters configs
- include_role:
- name: openshift_metrics
- tasks_from: update_master_config.yaml
-
-- name: Metrics Install Checkpoint End
- hosts: all
- gather_facts: false
- tasks:
- - name: Set Metrics install 'Complete'
- run_once: true
- set_stats:
- data:
- installer_phase_metrics:
- status: "Complete"
- end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
diff --git a/playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml b/playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml
index 044875d1c..d4e922ca9 100644
--- a/playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml
+++ b/playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml
@@ -21,7 +21,7 @@
name: etcd
tasks_from: remove_ca_certificates
-- include: ../../openshift-etcd/ca.yml
+- include: ../../../openshift-etcd/private/ca.yml
- name: Create temp directory for syncing certs
hosts: localhost
@@ -41,11 +41,10 @@
name: etcd
tasks_from: distribute_ca
vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
etcd_sync_cert_dir: "{{ hostvars['localhost'].g_etcd_mktemp.stdout }}"
etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
-- include: ../../openshift-etcd/restart.yml
+- include: ../../../openshift-etcd/private/restart.yml
# Do not restart etcd when etcd certificates were previously expired.
when: ('expired' not in (hostvars
| oo_select_keys(groups['etcd'])
@@ -60,7 +59,6 @@
tasks_from: retrieve_ca_certificates
vars:
etcd_sync_cert_dir: "{{ hostvars['localhost'].g_etcd_mktemp.stdout }}"
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- name: Distribute etcd CA to masters
hosts: oo_masters_to_config
diff --git a/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml b/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
index eb225dfb5..b58bf3c91 100644
--- a/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
+++ b/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
@@ -272,7 +272,7 @@
state: absent
changed_when: false
-- include: ../../openshift-node/restart.yml
+- include: ../../../openshift-node/private/restart.yml
# Do not restart nodes when node, master or etcd certificates were previously expired.
when:
# nodes
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
index d086cad00..531175c85 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
@@ -9,7 +9,6 @@
tasks_from: backup
vars:
r_etcd_common_backup_tag: "{{ etcd_backup_tag }}"
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
r_etcd_common_embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
r_etcd_common_backup_sufix_name: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml
index d71c96cd7..c5ff4133c 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml
@@ -2,60 +2,9 @@
- name: Determine etcd version
hosts: oo_etcd_hosts_to_upgrade
tasks:
- - block:
- - name: Record RPM based etcd version
- command: rpm -qa --qf '%{version}' etcd\*
- args:
- warn: no
- register: etcd_rpm_version
- failed_when: false
- # AUDIT:changed_when: `false` because we are only inspecting
- # state, not manipulating anything
- changed_when: false
- - debug:
- msg: "Etcd rpm version {{ etcd_rpm_version.stdout }} detected"
- when:
- - not openshift.common.is_containerized | bool
-
- - block:
- - name: Record containerized etcd version (docker)
- command: docker exec etcd_container rpm -qa --qf '%{version}' etcd\*
- register: etcd_container_version_docker
- failed_when: false
- # AUDIT:changed_when: `false` because we are only inspecting
- # state, not manipulating anything
- changed_when: false
- when:
- - not openshift.common.is_etcd_system_container | bool
-
- # Given a register variables is set even if the whwen condition
- # is false, we need to set etcd_container_version separately
- - set_fact:
- etcd_container_version: "{{ etcd_container_version_docker.stdout }}"
- when:
- - not openshift.common.is_etcd_system_container | bool
-
- - name: Record containerized etcd version (runc)
- command: runc exec etcd rpm -qa --qf '%{version}' etcd\*
- register: etcd_container_version_runc
- failed_when: false
- # AUDIT:changed_when: `false` because we are only inspecting
- # state, not manipulating anything
- changed_when: false
- when:
- - openshift.common.is_etcd_system_container | bool
-
- # Given a register variables is set even if the whwen condition
- # is false, we need to set etcd_container_version separately
- - set_fact:
- etcd_container_version: "{{ etcd_container_version_runc.stdout }}"
- when:
- - openshift.common.is_etcd_system_container | bool
-
- - debug:
- msg: "Etcd containerized version {{ etcd_container_version }} detected"
- when:
- - openshift.common.is_containerized | bool
+ - include_role:
+ name: etcd
+ tasks_from: version_detect.yml
- include: upgrade_rpm_members.yml
vars:
@@ -93,6 +42,14 @@
vars:
etcd_upgrade_version: '3.1.3'
+- include: upgrade_rpm_members.yml
+ vars:
+ etcd_upgrade_version: '3.2'
+
+- include: upgrade_image_members.yml
+ vars:
+ etcd_upgrade_version: '3.2.7'
+
- name: Upgrade fedora to latest
hosts: oo_etcd_hosts_to_upgrade
serial: 1
@@ -101,7 +58,6 @@
name: etcd
tasks_from: upgrade_image
vars:
- r_etcd_common_etcd_runtime: "host"
etcd_peer: "{{ openshift.common.hostname }}"
when:
- ansible_distribution == 'Fedora'
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml
index e5e895775..6fca42bd0 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml
@@ -11,7 +11,6 @@
tasks_from: upgrade_image
vars:
r_etcd_upgrade_version: "{{ etcd_upgrade_version }}"
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
etcd_peer: "{{ openshift.common.hostname }}"
when:
- etcd_container_version | default('99') | version_compare(etcd_upgrade_version,'<')
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml
index a2a26bad4..51e8786b3 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml
@@ -11,7 +11,6 @@
tasks_from: upgrade_rpm
vars:
r_etcd_upgrade_version: "{{ etcd_upgrade_version }}"
- r_etcd_common_etcd_runtime: "host"
etcd_peer: "{{ openshift.common.hostname }}"
when:
- etcd_rpm_version.stdout | default('99') | version_compare(etcd_upgrade_version, '<')
diff --git a/playbooks/common/openshift-etcd/ca.yml b/playbooks/common/openshift-etcd/ca.yml
deleted file mode 100644
index ac5543be9..000000000
--- a/playbooks/common/openshift-etcd/ca.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Generate new etcd CA
- hosts: oo_first_etcd
- roles:
- - role: openshift_etcd_facts
- tasks:
- - include_role:
- name: etcd
- tasks_from: ca
- vars:
- etcd_peers: "{{ groups.oo_etcd_to_config | default([], true) }}"
- etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
- etcd_certificates_etcd_hosts: "{{ groups.oo_etcd_to_config | default([], true) }}"
- when:
- - etcd_ca_setup | default(True) | bool
diff --git a/playbooks/common/openshift-etcd/certificates.yml b/playbooks/common/openshift-etcd/certificates.yml
deleted file mode 100644
index eb6b94f33..000000000
--- a/playbooks/common/openshift-etcd/certificates.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- include: server_certificates.yml
-
-- include: master_etcd_certificates.yml
diff --git a/playbooks/common/openshift-etcd/config.yml b/playbooks/common/openshift-etcd/config.yml
deleted file mode 100644
index 3fe483785..000000000
--- a/playbooks/common/openshift-etcd/config.yml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- name: etcd Install Checkpoint Start
- hosts: all
- gather_facts: false
- tasks:
- - name: Set etcd install 'In Progress'
- run_once: true
- set_stats:
- data:
- installer_phase_etcd:
- status: "In Progress"
- start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
-
-- include: ca.yml
-
-- include: certificates.yml
-
-- name: Configure etcd
- hosts: oo_etcd_to_config
- any_errors_fatal: true
- roles:
- - role: os_firewall
- - role: openshift_etcd
- etcd_peers: "{{ groups.oo_etcd_to_config | default([], true) }}"
- etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
- etcd_certificates_etcd_hosts: "{{ groups.oo_etcd_to_config | default([], true) }}"
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- - role: nickhammond.logrotate
-
-- name: etcd Install Checkpoint End
- hosts: all
- gather_facts: false
- tasks:
- - name: Set etcd install 'Complete'
- run_once: true
- set_stats:
- data:
- installer_phase_etcd:
- status: "Complete"
- end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
diff --git a/playbooks/common/openshift-etcd/embedded2external.yml b/playbooks/common/openshift-etcd/embedded2external.yml
deleted file mode 100644
index b16b78c4f..000000000
--- a/playbooks/common/openshift-etcd/embedded2external.yml
+++ /dev/null
@@ -1,172 +0,0 @@
----
-- name: Pre-migrate checks
- hosts: localhost
- tasks:
- # Check there is only one etcd host
- - assert:
- that: groups.oo_etcd_to_config | default([]) | length == 1
- msg: "[etcd] group must contain only one host"
- # Check there is only one master
- - assert:
- that: groups.oo_masters_to_config | default([]) | length == 1
- msg: "[master] group must contain only one host"
-
-# 1. stop a master
-- name: Prepare masters for etcd data migration
- hosts: oo_first_master
- roles:
- - role: openshift_facts
- tasks:
- - name: Check the master API is ready
- include_role:
- name: openshift_master
- tasks_from: check_master_api_is_ready
- - set_fact:
- master_service: "{{ openshift.common.service_type + '-master' }}"
- embedded_etcd_backup_suffix: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"
- - debug:
- msg: "master service name: {{ master_service }}"
- - name: Stop master
- service:
- name: "{{ master_service }}"
- state: stopped
- # 2. backup embedded etcd
- # Can't use with_items with include_role: https://github.com/ansible/ansible/issues/21285
- - include_role:
- name: etcd
- tasks_from: backup
- vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- r_etcd_common_backup_tag: pre-migrate
- r_etcd_common_embedded_etcd: "{{ true }}"
- r_etcd_common_backup_sufix_name: "{{ embedded_etcd_backup_suffix }}"
-
- - include_role:
- name: etcd
- tasks_from: backup.archive
- vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- r_etcd_common_backup_tag: pre-migrate
- r_etcd_common_embedded_etcd: "{{ true }}"
- r_etcd_common_backup_sufix_name: "{{ embedded_etcd_backup_suffix }}"
-
-# 3. deploy certificates (for etcd and master)
-- include: ca.yml
-
-- include: server_certificates.yml
-
-- name: Backup etcd client certificates for master host
- hosts: oo_first_master
- tasks:
- - include_role:
- name: etcd
- tasks_from: backup_master_etcd_certificates
-
-- name: Redeploy master etcd certificates
- include: master_etcd_certificates.yml
- vars:
- etcd_certificates_redeploy: "{{ true }}"
-
-# 4. deploy external etcd
-- include: ../openshift-etcd/config.yml
-
-# 5. stop external etcd
-- name: Cleanse etcd
- hosts: oo_etcd_to_config[0]
- gather_facts: no
- pre_tasks:
- - include_role:
- name: etcd
- tasks_from: disable_etcd
- vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- - include_role:
- name: etcd
- tasks_from: clean_data
- vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
-
-# 6. copy the embedded etcd backup to the external host
-# TODO(jchaloup): if the etcd and first master are on the same host, just copy the directory
-- name: Copy embedded etcd backup to the external host
- hosts: localhost
- tasks:
- - name: Create local temp directory for syncing etcd backup
- local_action: command mktemp -d /tmp/etcd_backup-XXXXXXX
- register: g_etcd_client_mktemp
- changed_when: False
- become: no
-
- - include_role:
- name: etcd
- tasks_from: backup.fetch
- vars:
- r_etcd_common_etcd_runtime: "{{ hostvars[groups.oo_first_master.0].openshift.common.etcd_runtime }}"
- etcd_backup_sync_directory: "{{ g_etcd_client_mktemp.stdout }}"
- r_etcd_common_backup_tag: pre-migrate
- r_etcd_common_embedded_etcd: "{{ true }}"
- r_etcd_common_backup_sufix_name: "{{ hostvars[groups.oo_first_master.0].embedded_etcd_backup_suffix }}"
- delegate_to: "{{ groups.oo_first_master[0] }}"
-
- - include_role:
- name: etcd
- tasks_from: backup.copy
- vars:
- r_etcd_common_etcd_runtime: "{{ hostvars[groups.oo_etcd_to_config.0].openshift.common.etcd_runtime }}"
- etcd_backup_sync_directory: "{{ g_etcd_client_mktemp.stdout }}"
- r_etcd_common_backup_tag: pre-migrate
- r_etcd_common_backup_sufix_name: "{{ hostvars[groups.oo_first_master.0].embedded_etcd_backup_suffix }}"
- delegate_to: "{{ groups.oo_etcd_to_config[0] }}"
-
- - debug:
- msg: "etcd_backup_dest_directory: {{ g_etcd_client_mktemp.stdout }}"
-
- - name: Delete temporary directory
- local_action: file path="{{ g_etcd_client_mktemp.stdout }}" state=absent
- changed_when: False
- become: no
-
-# 7. force new cluster from the backup
-- name: Force new etcd cluster
- hosts: oo_etcd_to_config[0]
- tasks:
- - include_role:
- name: etcd
- tasks_from: backup.unarchive
- vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- r_etcd_common_backup_tag: pre-migrate
- r_etcd_common_backup_sufix_name: "{{ hostvars[groups.oo_first_master.0].embedded_etcd_backup_suffix }}"
-
- - include_role:
- name: etcd
- tasks_from: backup.force_new_cluster
- vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- r_etcd_common_backup_tag: pre-migrate
- r_etcd_common_backup_sufix_name: "{{ hostvars[groups.oo_first_master.0].embedded_etcd_backup_suffix }}"
- etcd_peer: "{{ openshift.common.ip }}"
- etcd_url_scheme: "https"
- etcd_peer_url_scheme: "https"
-
-# 8. re-configure master to use the external etcd
-- name: Configure master to use external etcd
- hosts: oo_first_master
- tasks:
- - include_role:
- name: openshift_master
- tasks_from: configure_external_etcd
- vars:
- etcd_peer_url_scheme: "https"
- etcd_ip: "{{ hostvars[groups.oo_etcd_to_config.0].openshift.common.ip }}"
- etcd_peer_port: 2379
-
- # 9. start the master
- - name: Start master
- service:
- name: "{{ master_service }}"
- state: started
- register: service_status
- until: service_status.state is defined and service_status.state == "started"
- retries: 5
- delay: 10
diff --git a/playbooks/common/openshift-etcd/filter_plugins b/playbooks/common/openshift-etcd/filter_plugins
deleted file mode 120000
index 99a95e4ca..000000000
--- a/playbooks/common/openshift-etcd/filter_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-etcd/lookup_plugins b/playbooks/common/openshift-etcd/lookup_plugins
deleted file mode 120000
index ac79701db..000000000
--- a/playbooks/common/openshift-etcd/lookup_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-etcd/master_etcd_certificates.yml b/playbooks/common/openshift-etcd/master_etcd_certificates.yml
deleted file mode 100644
index 0a25aac57..000000000
--- a/playbooks/common/openshift-etcd/master_etcd_certificates.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- name: Create etcd client certificates for master hosts
- hosts: oo_masters_to_config
- any_errors_fatal: true
- roles:
- - role: openshift_etcd_facts
- - role: openshift_etcd_client_certificates
- etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
- etcd_cert_subdir: "openshift-master-{{ openshift.common.hostname }}"
- etcd_cert_config_dir: "{{ openshift.common.config_base }}/master"
- etcd_cert_prefix: "master.etcd-"
- openshift_ca_host: "{{ groups.oo_first_master.0 }}"
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config
diff --git a/playbooks/common/openshift-etcd/migrate.yml b/playbooks/common/openshift-etcd/migrate.yml
deleted file mode 100644
index 31362f2f6..000000000
--- a/playbooks/common/openshift-etcd/migrate.yml
+++ /dev/null
@@ -1,169 +0,0 @@
----
-- name: Check if the master has embedded etcd
- hosts: localhost
- connection: local
- become: no
- gather_facts: no
- tags:
- - always
- tasks:
- - fail:
- msg: "Migration of an embedded etcd is not supported. Please, migrate the embedded etcd into an external etcd first."
- when:
- - groups.oo_etcd_to_config | default([]) | length == 0
-
-- name: Run pre-checks
- hosts: oo_etcd_to_migrate
- tasks:
- - include_role:
- name: etcd
- tasks_from: migrate.pre_check
- vars:
- r_etcd_common_embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
- etcd_peer: "{{ ansible_default_ipv4.address }}"
-
-# TODO: This will be different for release-3.6 branch
-- name: Prepare masters for etcd data migration
- hosts: oo_masters_to_config
- tasks:
- - set_fact:
- master_services:
- - "{{ openshift.common.service_type + '-master-controllers' }}"
- - "{{ openshift.common.service_type + '-master-api' }}"
- - debug:
- msg: "master service name: {{ master_services }}"
- - name: Stop masters
- service:
- name: "{{ item }}"
- state: stopped
- with_items: "{{ master_services }}"
-
-- name: Backup v2 data
- hosts: oo_etcd_to_migrate
- gather_facts: no
- roles:
- - role: openshift_facts
- post_tasks:
- - include_role:
- name: etcd
- tasks_from: backup
- vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- r_etcd_common_backup_tag: pre-migration
- r_etcd_common_embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
- r_etcd_common_backup_sufix_name: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"
-
-- name: Gate on etcd backup
- hosts: localhost
- connection: local
- become: no
- tasks:
- - set_fact:
- etcd_backup_completed: "{{ hostvars
- | oo_select_keys(groups.oo_etcd_to_migrate)
- | oo_collect('inventory_hostname', {'r_etcd_common_backup_complete': true}) }}"
- - set_fact:
- etcd_backup_failed: "{{ groups.oo_etcd_to_migrate | difference(etcd_backup_completed) | list }}"
- - fail:
- msg: "Migration cannot continue. The following hosts did not complete etcd backup: {{ etcd_backup_failed | join(',') }}"
- when:
- - etcd_backup_failed | length > 0
-
-- name: Stop etcd
- hosts: oo_etcd_to_migrate
- gather_facts: no
- pre_tasks:
- - include_role:
- name: etcd
- tasks_from: disable_etcd
- vars:
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
-
-- name: Migrate data on first etcd
- hosts: oo_etcd_to_migrate[0]
- gather_facts: no
- tasks:
- - include_role:
- name: etcd
- tasks_from: migrate
- vars:
- r_etcd_common_embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
- etcd_peer: "{{ openshift.common.ip }}"
- etcd_url_scheme: "https"
- etcd_peer_url_scheme: "https"
-
-- name: Clean data stores on remaining etcd hosts
- hosts: oo_etcd_to_migrate[1:]
- gather_facts: no
- tasks:
- - include_role:
- name: etcd
- tasks_from: clean_data
- vars:
- r_etcd_common_embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
- etcd_peer: "{{ openshift.common.ip }}"
- etcd_url_scheme: "https"
- etcd_peer_url_scheme: "https"
- - name: Add etcd hosts
- delegate_to: localhost
- add_host:
- name: "{{ item }}"
- groups: oo_new_etcd_to_config
- ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
- ansible_become: "{{ g_sudo | default(omit) }}"
- with_items: "{{ groups.oo_etcd_to_migrate[1:] | default([]) }}"
- changed_when: no
- - name: Set success
- set_fact:
- r_etcd_migrate_success: true
-
-- include: ./scaleup.yml
-
-- name: Gate on etcd migration
- hosts: oo_masters_to_config
- gather_facts: no
- tasks:
- - set_fact:
- etcd_migration_completed: "{{ hostvars
- | oo_select_keys(groups.oo_etcd_to_migrate)
- | oo_collect('inventory_hostname', {'r_etcd_migrate_success': true}) }}"
- - set_fact:
- etcd_migration_failed: "{{ groups.oo_etcd_to_migrate | difference(etcd_migration_completed) | list }}"
-
-- name: Add TTLs on the first master
- hosts: oo_first_master[0]
- tasks:
- - include_role:
- name: etcd
- tasks_from: migrate.add_ttls
- vars:
- etcd_peer: "{{ hostvars[groups.oo_etcd_to_migrate.0].openshift.common.ip }}"
- etcd_url_scheme: "https"
- etcd_peer_url_scheme: "https"
- when: etcd_migration_failed | length == 0
-
-- name: Configure masters if etcd data migration is succesfull
- hosts: oo_masters_to_config
- tasks:
- - include_role:
- name: etcd
- tasks_from: migrate.configure_master
- when: etcd_migration_failed | length == 0
- - debug:
- msg: "Skipping master re-configuration since migration failed."
- when:
- - etcd_migration_failed | length > 0
- - name: Start master services
- service:
- name: "{{ item }}"
- state: started
- register: service_status
- # Sometimes the master-api, resp. master-controllers fails to start for the first time
- until: service_status.state is defined and service_status.state == "started"
- retries: 5
- delay: 10
- with_items: "{{ master_services[::-1] }}"
- - fail:
- msg: "Migration failed. The following hosts were not properly migrated: {{ etcd_migration_failed | join(',') }}"
- when:
- - etcd_migration_failed | length > 0
diff --git a/playbooks/common/openshift-etcd/restart.yml b/playbooks/common/openshift-etcd/restart.yml
deleted file mode 100644
index 5eaea5ae8..000000000
--- a/playbooks/common/openshift-etcd/restart.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: Restart etcd
- hosts: oo_etcd_to_config
- serial: 1
- tasks:
- - name: restart etcd
- service:
- name: "{{ 'etcd_container' if openshift.common.etcd_runtime == 'docker' else 'etcd' }}"
- state: restarted
- when:
- - not g_etcd_certificates_expired | default(false) | bool
-
-- name: Restart etcd
- hosts: oo_etcd_to_config
- tasks:
- - name: stop etcd
- service:
- name: "{{ 'etcd_container' if openshift.common.etcd_runtime == 'docker' else 'etcd' }}"
- state: stopped
- when:
- - g_etcd_certificates_expired | default(false) | bool
- - name: start etcd
- service:
- name: "{{ 'etcd_container' if openshift.common.etcd_runtime == 'docker' else 'etcd' }}"
- state: started
- when:
- - g_etcd_certificates_expired | default(false) | bool
diff --git a/playbooks/common/openshift-etcd/roles b/playbooks/common/openshift-etcd/roles
deleted file mode 120000
index e2b799b9d..000000000
--- a/playbooks/common/openshift-etcd/roles
+++ /dev/null
@@ -1 +0,0 @@
-../../../roles/ \ No newline at end of file
diff --git a/playbooks/common/openshift-etcd/scaleup.yml b/playbooks/common/openshift-etcd/scaleup.yml
deleted file mode 100644
index 20061366c..000000000
--- a/playbooks/common/openshift-etcd/scaleup.yml
+++ /dev/null
@@ -1,83 +0,0 @@
----
-- name: Gather facts
- hosts: oo_etcd_to_config:oo_new_etcd_to_config
- roles:
- - openshift_etcd_facts
- post_tasks:
- - set_fact:
- etcd_hostname: "{{ etcd_hostname }}"
- etcd_ip: "{{ etcd_ip }}"
-
-- name: Configure etcd
- hosts: oo_new_etcd_to_config
- serial: 1
- any_errors_fatal: true
- vars:
- etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
- pre_tasks:
- - name: Add new etcd members to cluster
- command: >
- /usr/bin/etcdctl --cert-file {{ etcd_peer_cert_file }}
- --key-file {{ etcd_peer_key_file }}
- --ca-file {{ etcd_peer_ca_file }}
- -C {{ etcd_peer_url_scheme }}://{{ hostvars[etcd_ca_host].etcd_ip }}:{{ etcd_client_port }}
- member add {{ etcd_hostname }} {{ etcd_peer_url_scheme }}://{{ etcd_ip }}:{{ etcd_peer_port }}
- delegate_to: "{{ etcd_ca_host }}"
- failed_when:
- - etcd_add_check.rc == 1
- - ("peerURL exists" not in etcd_add_check.stderr)
- register: etcd_add_check
- retries: 3
- delay: 10
- until: etcd_add_check.rc == 0
- - include_role:
- name: etcd
- tasks_from: server_certificates
- vars:
- etcd_peers: "{{ groups.oo_new_etcd_to_config | default([], true) }}"
- etcd_certificates_etcd_hosts: "{{ groups.oo_new_etcd_to_config | default([], true) }}"
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- roles:
- - role: os_firewall
- when: etcd_add_check.rc == 0
- - role: openshift_etcd
- when: etcd_add_check.rc == 0
- etcd_peers: "{{ groups.oo_etcd_to_config | union(groups.oo_new_etcd_to_config)| default([], true) }}"
- etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
- etcd_certificates_etcd_hosts: "{{ groups.oo_etcd_to_config | default([], true) }}"
- etcd_initial_cluster_state: "existing"
- etcd_initial_cluster: "{{ etcd_add_check.stdout_lines[3] | regex_replace('ETCD_INITIAL_CLUSTER=','') | regex_replace('\"','') }}"
- etcd_ca_setup: False
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
- - role: nickhammond.logrotate
- when: etcd_add_check.rc == 0
- post_tasks:
- - name: Verify cluster is stable
- command: >
- /usr/bin/etcdctl --cert-file {{ etcd_peer_cert_file }}
- --key-file {{ etcd_peer_key_file }}
- --ca-file {{ etcd_peer_ca_file }}
- -C {{ etcd_peer_url_scheme }}://{{ hostvars[etcd_ca_host].etcd_hostname }}:{{ etcd_client_port }}
- cluster-health
- register: scaleup_health
- retries: 3
- delay: 30
- until: scaleup_health.rc == 0
-
-- name: Update master etcd client urls
- hosts: oo_masters_to_config
- serial: 1
- vars:
- etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
- openshift_ca_host: "{{ groups.oo_first_master.0 }}"
- openshift_master_etcd_hosts: "{{ hostvars
- | oo_select_keys(groups['oo_etcd_to_config'] | union(groups['oo_new_etcd_to_config'] | default([]) ))
- | oo_collect('openshift.common.hostname')
- | default(none, true) }}"
- openshift_master_etcd_port: "{{ (etcd_client_port | default('2379')) if (groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config) else none }}"
- roles:
- - role: openshift_master_facts
- post_tasks:
- - include_role:
- name: openshift_master
- tasks_from: update_etcd_client_urls
diff --git a/playbooks/common/openshift-etcd/server_certificates.yml b/playbooks/common/openshift-etcd/server_certificates.yml
deleted file mode 100644
index 10e06747b..000000000
--- a/playbooks/common/openshift-etcd/server_certificates.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Create etcd server certificates for etcd hosts
- hosts: oo_etcd_to_config
- any_errors_fatal: true
- roles:
- - role: openshift_etcd_facts
- post_tasks:
- - include_role:
- name: etcd
- tasks_from: server_certificates
- vars:
- etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
- etcd_peers: "{{ groups.oo_etcd_to_config | default([], true) }}"
- etcd_certificates_etcd_hosts: "{{ groups.oo_etcd_to_config | default([], true) }}"
- r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
diff --git a/playbooks/common/openshift-loadbalancer/config.yml b/playbooks/common/openshift-loadbalancer/config.yml
deleted file mode 100644
index d737b836b..000000000
--- a/playbooks/common/openshift-loadbalancer/config.yml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-- name: Load Balancer Install Checkpoint Start
- hosts: all
- gather_facts: false
- tasks:
- - name: Set load balancer install 'In Progress'
- run_once: true
- set_stats:
- data:
- installer_phase_loadbalancer:
- status: "In Progress"
- start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
-
-- name: Configure firewall and docker for load balancers
- hosts: oo_lb_to_config:!oo_masters_to_config:!oo_nodes_to_config
- vars:
- openshift_image_tag: "{{ hostvars[groups.oo_first_master.0].openshift_image_tag }}"
- roles:
- - role: os_firewall
- - role: openshift_docker
- when: openshift.common.is_containerized | default(False) | bool and not skip_docker_role | default(False) | bool
-
-- name: Configure load balancers
- hosts: oo_lb_to_config
- vars:
- openshift_loadbalancer_frontends: "{{ (openshift_master_api_port | default(8443)
- | oo_openshift_loadbalancer_frontends(hostvars | oo_select_keys(groups['oo_masters']),
- openshift_use_nuage | default(false),
- nuage_mon_rest_server_port | default(none)))
- + openshift_loadbalancer_additional_frontends | default([]) }}"
- openshift_loadbalancer_backends: "{{ (openshift_master_api_port | default(8443)
- | oo_openshift_loadbalancer_backends(hostvars | oo_select_keys(groups['oo_masters']),
- openshift_use_nuage | default(false),
- nuage_mon_rest_server_port | default(none)))
- + openshift_loadbalancer_additional_backends | default([]) }}"
- openshift_image_tag: "{{ hostvars[groups.oo_first_master.0].openshift_image_tag }}"
- roles:
- - role: openshift_loadbalancer
- - role: tuned
-
-- name: Load Balancer Install Checkpoint End
- hosts: all
- gather_facts: false
- tasks:
- - name: Set load balancer install 'Complete'
- run_once: true
- set_stats:
- data:
- installer_phase_loadbalancer:
- status: "Complete"
- end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
diff --git a/playbooks/common/openshift-loadbalancer/filter_plugins b/playbooks/common/openshift-loadbalancer/filter_plugins
deleted file mode 120000
index 99a95e4ca..000000000
--- a/playbooks/common/openshift-loadbalancer/filter_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-loadbalancer/lookup_plugins b/playbooks/common/openshift-loadbalancer/lookup_plugins
deleted file mode 120000
index ac79701db..000000000
--- a/playbooks/common/openshift-loadbalancer/lookup_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-loadbalancer/roles b/playbooks/common/openshift-loadbalancer/roles
deleted file mode 120000
index e2b799b9d..000000000
--- a/playbooks/common/openshift-loadbalancer/roles
+++ /dev/null
@@ -1 +0,0 @@
-../../../roles/ \ No newline at end of file
diff --git a/playbooks/common/openshift-master/scaleup.yml b/playbooks/common/openshift-master/scaleup.yml
index 4c415ebce..ed54e6ca4 100644
--- a/playbooks/common/openshift-master/scaleup.yml
+++ b/playbooks/common/openshift-master/scaleup.yml
@@ -46,12 +46,12 @@
- include: ../openshift-master/set_network_facts.yml
-- include: ../openshift-etcd/certificates.yml
+- include: ../../openshift-etcd/private/certificates.yml
- include: ../openshift-master/config.yml
-- include: ../openshift-loadbalancer/config.yml
+- include: ../../openshift-loadbalancer/private/config.yml
-- include: ../openshift-node/certificates.yml
+- include: ../../openshift-node/private/certificates.yml
-- include: ../openshift-node/config.yml
+- include: ../../openshift-node/private/config.yml
diff --git a/playbooks/common/openshift-nfs/config.yml b/playbooks/common/openshift-nfs/config.yml
deleted file mode 100644
index 6ea77e00b..000000000
--- a/playbooks/common/openshift-nfs/config.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- name: NFS Install Checkpoint Start
- hosts: all
- gather_facts: false
- tasks:
- - name: Set NFS install 'In Progress'
- run_once: true
- set_stats:
- data:
- installer_phase_nfs:
- status: "In Progress"
- start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
-
-- name: Configure nfs
- hosts: oo_nfs_to_config
- roles:
- - role: os_firewall
- - role: openshift_storage_nfs
-
-- name: NFS Install Checkpoint End
- hosts: all
- gather_facts: false
- tasks:
- - name: Set NFS install 'Complete'
- run_once: true
- set_stats:
- data:
- installer_phase_nfs:
- status: "Complete"
- end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
diff --git a/playbooks/common/openshift-nfs/filter_plugins b/playbooks/common/openshift-nfs/filter_plugins
deleted file mode 120000
index 99a95e4ca..000000000
--- a/playbooks/common/openshift-nfs/filter_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-nfs/lookup_plugins b/playbooks/common/openshift-nfs/lookup_plugins
deleted file mode 120000
index ac79701db..000000000
--- a/playbooks/common/openshift-nfs/lookup_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-nfs/roles b/playbooks/common/openshift-nfs/roles
deleted file mode 120000
index e2b799b9d..000000000
--- a/playbooks/common/openshift-nfs/roles
+++ /dev/null
@@ -1 +0,0 @@
-../../../roles/ \ No newline at end of file
diff --git a/playbooks/common/openshift-node/additional_config.yml b/playbooks/common/openshift-node/additional_config.yml
deleted file mode 100644
index ac757397b..000000000
--- a/playbooks/common/openshift-node/additional_config.yml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-- name: create additional node network plugin groups
- hosts: "{{ openshift_node_scale_up_group | default('oo_nodes_to_config') }}"
- tasks:
- # Creating these node groups will prevent a ton of skipped tasks.
- # Create group for flannel nodes
- - group_by:
- key: oo_nodes_use_{{ (openshift_use_flannel | default(False)) | ternary('flannel','nothing') }}
- changed_when: False
- # Create group for calico nodes
- - group_by:
- key: oo_nodes_use_{{ (openshift_use_calico | default(False)) | ternary('calico','nothing') }}
- changed_when: False
- # Create group for nuage nodes
- - group_by:
- key: oo_nodes_use_{{ (openshift_use_nuage | default(False)) | ternary('nuage','nothing') }}
- changed_when: False
- # Create group for contiv nodes
- - group_by:
- key: oo_nodes_use_{{ (openshift_use_contiv | default(False)) | ternary('contiv','nothing') }}
- changed_when: False
- # Create group for kuryr nodes
- - group_by:
- key: oo_nodes_use_{{ (openshift_use_kuryr | default(False)) | ternary('kuryr','nothing') }}
- changed_when: False
-
-- include: etcd_client_config.yml
- vars:
- openshift_node_scale_up_group: "oo_nodes_use_flannel:oo_nodes_use_calico:oo_nodes_use_contiv:oo_nodes_use_kuryr"
-
-- name: Additional node config
- hosts: oo_nodes_use_flannel
- roles:
- - role: flannel
- etcd_urls: "{{ hostvars[groups.oo_first_master.0].openshift.master.etcd_urls }}"
- embedded_etcd: "{{ hostvars[groups.oo_first_master.0].openshift.master.embedded_etcd }}"
- when: openshift_use_flannel | default(false) | bool
-
-- name: Additional node config
- hosts: oo_nodes_use_calico
- roles:
- - role: calico
- when: openshift_use_calico | default(false) | bool
-
-- name: Additional node config
- hosts: oo_nodes_use_nuage
- roles:
- - role: nuage_node
- when: openshift_use_nuage | default(false) | bool
-
-- name: Additional node config
- hosts: oo_nodes_use_contiv
- roles:
- - role: contiv
- contiv_role: netplugin
- when: openshift_use_contiv | default(false) | bool
-
-- name: Configure Kuryr node
- hosts: oo_nodes_use_kuryr
- tasks:
- - include_role:
- name: kuryr
- tasks_from: node
- when: openshift_use_kuryr | default(false) | bool
diff --git a/playbooks/common/openshift-node/certificates.yml b/playbooks/common/openshift-node/certificates.yml
deleted file mode 100644
index 908885ee6..000000000
--- a/playbooks/common/openshift-node/certificates.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Create OpenShift certificates for node hosts
- hosts: oo_nodes_to_config
- gather_facts: no
- roles:
- - role: openshift_node_certificates
- openshift_ca_host: "{{ groups.oo_first_master.0 }}"
- when: not openshift_node_bootstrap | default(false) | bool
diff --git a/playbooks/common/openshift-node/clean_image.yml b/playbooks/common/openshift-node/clean_image.yml
deleted file mode 100644
index 38753d0af..000000000
--- a/playbooks/common/openshift-node/clean_image.yml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: Configure nodes
- hosts: oo_nodes_to_config:!oo_containerized_master_nodes
- tasks:
- - name: Remove any ansible facts created during AMI creation
- file:
- path: "/etc/ansible/facts.d/{{ item }}"
- state: absent
- with_items:
- - openshift.fact
diff --git a/playbooks/common/openshift-node/config.yml b/playbooks/common/openshift-node/config.yml
deleted file mode 100644
index 28e3c1b1b..000000000
--- a/playbooks/common/openshift-node/config.yml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- name: Node Install Checkpoint Start
- hosts: all
- gather_facts: false
- tasks:
- - name: Set Node install 'In Progress'
- run_once: true
- set_stats:
- data:
- installer_phase_node:
- status: "In Progress"
- start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
-
-- include: certificates.yml
-
-- include: setup.yml
-
-- include: containerized_nodes.yml
-
-- include: configure_nodes.yml
-
-- include: additional_config.yml
-
-- include: manage_node.yml
-
-- include: enable_excluders.yml
-
-- name: Node Install Checkpoint End
- hosts: all
- gather_facts: false
- tasks:
- - name: Set Node install 'Complete'
- run_once: true
- set_stats:
- data:
- installer_phase_node:
- status: "Complete"
- end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
diff --git a/playbooks/common/openshift-node/configure_nodes.yml b/playbooks/common/openshift-node/configure_nodes.yml
deleted file mode 100644
index 17259422d..000000000
--- a/playbooks/common/openshift-node/configure_nodes.yml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: Configure nodes
- hosts: oo_nodes_to_config:!oo_containerized_master_nodes
- vars:
- openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
- openshift_node_first_master_ip: "{{ hostvars[groups.oo_first_master.0].openshift.common.ip }}"
- openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}"
- openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config']
- | union(groups['oo_masters_to_config'])
- | union(groups['oo_etcd_to_config'] | default([])))
- | oo_collect('openshift.common.hostname') | default([]) | join (',')
- }}"
- roles:
- - role: os_firewall
- - role: openshift_node
- - role: tuned
- - role: nickhammond.logrotate
diff --git a/playbooks/common/openshift-node/containerized_nodes.yml b/playbooks/common/openshift-node/containerized_nodes.yml
deleted file mode 100644
index 6fac937e3..000000000
--- a/playbooks/common/openshift-node/containerized_nodes.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-- name: Configure containerized nodes
- hosts: oo_containerized_master_nodes
- serial: 1
- vars:
- openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
- openshift_node_first_master_ip: "{{ hostvars[groups.oo_first_master.0].openshift.common.ip }}"
- openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}"
- openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config']
- | union(groups['oo_masters_to_config'])
- | union(groups['oo_etcd_to_config'] | default([])))
- | oo_collect('openshift.common.hostname') | default([]) | join (',')
- }}"
-
- roles:
- - role: os_firewall
- - role: openshift_node
- openshift_ca_host: "{{ groups.oo_first_master.0 }}"
- - role: nickhammond.logrotate
diff --git a/playbooks/common/openshift-node/enable_excluders.yml b/playbooks/common/openshift-node/enable_excluders.yml
deleted file mode 100644
index 5288b14f9..000000000
--- a/playbooks/common/openshift-node/enable_excluders.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Re-enable excluder if it was previously enabled
- hosts: oo_nodes_to_config
- gather_facts: no
- roles:
- - role: openshift_excluder
- r_openshift_excluder_action: enable
- r_openshift_excluder_service_type: "{{ openshift.common.service_type }}"
diff --git a/playbooks/common/openshift-node/etcd_client_config.yml b/playbooks/common/openshift-node/etcd_client_config.yml
deleted file mode 100644
index c3fa38a81..000000000
--- a/playbooks/common/openshift-node/etcd_client_config.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- name: etcd_client node config
- hosts: "{{ openshift_node_scale_up_group | default('this_group_does_not_exist') }}"
- roles:
- - role: openshift_facts
- - role: openshift_etcd_facts
- - role: openshift_etcd_client_certificates
- etcd_cert_prefix: flannel.etcd-
- etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
- etcd_cert_subdir: "openshift-node-{{ openshift.common.hostname }}"
- etcd_cert_config_dir: "{{ openshift.common.config_base }}/node"
diff --git a/playbooks/common/openshift-node/filter_plugins b/playbooks/common/openshift-node/filter_plugins
deleted file mode 120000
index 99a95e4ca..000000000
--- a/playbooks/common/openshift-node/filter_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-node/image_prep.yml b/playbooks/common/openshift-node/image_prep.yml
deleted file mode 100644
index 3c042acdc..000000000
--- a/playbooks/common/openshift-node/image_prep.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: normalize groups
- include: ../../init/evaluate_groups.yml
-
-- name: initialize the facts
- include: ../../init/facts.yml
-
-- name: initialize the repositories
- include: ../../init/repos.yml
-
-- name: run node config setup
- include: setup.yml
-
-- name: run node config
- include: configure_nodes.yml
-
-- name: Re-enable excluders
- include: enable_excluders.yml
-
-- name: Remove any undesired artifacts from build
- include: clean_image.yml
diff --git a/playbooks/common/openshift-node/lookup_plugins b/playbooks/common/openshift-node/lookup_plugins
deleted file mode 120000
index ac79701db..000000000
--- a/playbooks/common/openshift-node/lookup_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-node/manage_node.yml b/playbooks/common/openshift-node/manage_node.yml
deleted file mode 100644
index f48a19a9c..000000000
--- a/playbooks/common/openshift-node/manage_node.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: Additional node config
- hosts: "{{ openshift_node_scale_up_group | default('oo_nodes_to_config') }}"
- vars:
- openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
- roles:
- - role: openshift_manage_node
- openshift_master_host: "{{ groups.oo_first_master.0 }}"
- tasks:
- - name: Create group for deployment type
- group_by: key=oo_nodes_deployment_type_{{ openshift.common.deployment_type }}
- changed_when: False
diff --git a/playbooks/common/openshift-node/network_manager.yml b/playbooks/common/openshift-node/network_manager.yml
deleted file mode 100644
index c2efb0483..000000000
--- a/playbooks/common/openshift-node/network_manager.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- include: ../../init/evaluate_groups.yml
-
-- name: Install and configure NetworkManager
- hosts: oo_all_hosts
- become: yes
- tasks:
- - name: install NetworkManager
- package:
- name: 'NetworkManager'
- state: present
-
- - name: configure NetworkManager
- lineinfile:
- dest: "/etc/sysconfig/network-scripts/ifcfg-{{ ansible_default_ipv4['interface'] }}"
- regexp: '^{{ item }}='
- line: '{{ item }}=yes'
- state: present
- create: yes
- with_items:
- - 'USE_PEERDNS'
- - 'NM_CONTROLLED'
-
- - name: enable and start NetworkManager
- service:
- name: 'NetworkManager'
- state: started
- enabled: yes
diff --git a/playbooks/common/openshift-node/restart.yml b/playbooks/common/openshift-node/restart.yml
deleted file mode 100644
index c3beb59b7..000000000
--- a/playbooks/common/openshift-node/restart.yml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-- name: Restart nodes
- hosts: oo_nodes_to_config
- serial: "{{ openshift_restart_nodes_serial | default(1) }}"
-
- roles:
- - lib_openshift
-
- tasks:
- - name: Restart docker
- service:
- name: docker
- state: restarted
- register: l_docker_restart_docker_in_node_result
- until: not l_docker_restart_docker_in_node_result | failed
- retries: 3
- delay: 30
-
- - name: Update docker facts
- openshift_facts:
- role: docker
-
- - name: Restart containerized services
- service:
- name: "{{ item }}"
- state: started
- with_items:
- - etcd_container
- - openvswitch
- - "{{ openshift.common.service_type }}-master-api"
- - "{{ openshift.common.service_type }}-master-controllers"
- - "{{ openshift.common.service_type }}-node"
- failed_when: false
- when: openshift.common.is_containerized | bool
-
- - name: Wait for master API to come back online
- wait_for:
- host: "{{ openshift.common.hostname }}"
- state: started
- delay: 10
- port: "{{ openshift.master.api_port }}"
- timeout: 600
- when: inventory_hostname in groups.oo_masters_to_config
-
- - name: restart node
- service:
- name: "{{ openshift.common.service_type }}-node"
- state: restarted
-
- - name: Wait for node to be ready
- oc_obj:
- state: list
- kind: node
- name: "{{ openshift.common.hostname | lower }}"
- register: node_output
- delegate_to: "{{ groups.oo_first_master.0 }}"
- when: inventory_hostname in groups.oo_nodes_to_config
- until: node_output.results.returncode == 0 and node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True
- # Give the node two minutes to come back online.
- retries: 24
- delay: 5
diff --git a/playbooks/common/openshift-node/roles b/playbooks/common/openshift-node/roles
deleted file mode 120000
index e2b799b9d..000000000
--- a/playbooks/common/openshift-node/roles
+++ /dev/null
@@ -1 +0,0 @@
-../../../roles/ \ No newline at end of file
diff --git a/playbooks/common/openshift-node/setup.yml b/playbooks/common/openshift-node/setup.yml
deleted file mode 100644
index 794c03a67..000000000
--- a/playbooks/common/openshift-node/setup.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: Disable excluders
- hosts: oo_nodes_to_config
- gather_facts: no
- roles:
- - role: openshift_excluder
- r_openshift_excluder_action: disable
- r_openshift_excluder_service_type: "{{ openshift.common.service_type }}"
-
-- name: Evaluate node groups
- hosts: localhost
- become: no
- connection: local
- tasks:
- - name: Evaluate oo_containerized_master_nodes
- add_host:
- name: "{{ item }}"
- groups: oo_containerized_master_nodes
- ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
- ansible_become: "{{ g_sudo | default(omit) }}"
- with_items: "{{ groups.oo_nodes_to_config | default([]) }}"
- when:
- - hostvars[item].openshift is defined
- - hostvars[item].openshift.common is defined
- - hostvars[item].openshift.common.is_containerized | bool
- - (item in groups.oo_nodes_to_config and item in groups.oo_masters_to_config)
- changed_when: False