summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/aws/openshift-cluster/hosted.yml5
-rw-r--r--playbooks/aws/openshift-cluster/install.yml4
-rw-r--r--playbooks/byo/openshift-cluster/openshift-hosted.yml4
-rw-r--r--playbooks/byo/openshift-cluster/openshift-prometheus.yml4
-rw-r--r--playbooks/byo/openshift-cluster/redeploy-certificates.yml8
-rw-r--r--playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml2
-rw-r--r--playbooks/byo/openshift-cluster/redeploy-master-certificates.yml4
-rw-r--r--playbooks/byo/openshift-master/additional_config.yml4
-rw-r--r--playbooks/byo/openshift-master/certificates.yml4
-rw-r--r--playbooks/byo/openshift-master/config.yml4
-rw-r--r--playbooks/byo/openshift-master/restart.yml4
-rw-r--r--playbooks/common/openshift-cluster/config.yml9
-rw-r--r--playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml4
-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.yml58
-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-cluster/upgrades/upgrade_control_plane.yml4
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml2
l---------playbooks/common/openshift-master/filter_plugins1
l---------playbooks/common/openshift-master/lookup_plugins1
-rw-r--r--playbooks/init/facts.yml7
-rw-r--r--playbooks/openshift-etcd/private/config.yml1
-rw-r--r--playbooks/openshift-etcd/private/embedded2external.yml10
-rw-r--r--playbooks/openshift-etcd/private/master_etcd_certificates.yml1
-rw-r--r--playbooks/openshift-etcd/private/migrate.yml3
-rw-r--r--playbooks/openshift-etcd/private/restart.yml20
-rw-r--r--playbooks/openshift-etcd/private/scaleup.yml2
-rw-r--r--playbooks/openshift-etcd/private/server_certificates.yml1
-rw-r--r--playbooks/openshift-hosted/config.yml4
-rw-r--r--playbooks/openshift-hosted/private/cockpit-ui.yml (renamed from playbooks/common/openshift-cluster/cockpit-ui.yml)0
-rw-r--r--playbooks/openshift-hosted/private/config.yml (renamed from playbooks/common/openshift-cluster/openshift_hosted.yml)3
-rw-r--r--playbooks/openshift-hosted/private/create_persistent_volumes.yml (renamed from playbooks/common/openshift-cluster/create_persistent_volumes.yml)0
-rw-r--r--playbooks/openshift-hosted/private/install_docker_gc.yml (renamed from playbooks/common/openshift-cluster/install_docker_gc.yml)0
-rw-r--r--playbooks/openshift-hosted/private/openshift_default_storage_class.yml (renamed from playbooks/common/openshift-cluster/openshift_default_storage_class.yml)0
-rw-r--r--playbooks/openshift-hosted/private/openshift_hosted_create_projects.yml (renamed from playbooks/common/openshift-cluster/openshift_hosted_create_projects.yml)0
-rw-r--r--playbooks/openshift-hosted/private/openshift_hosted_registry.yml (renamed from playbooks/common/openshift-cluster/openshift_hosted_registry.yml)0
-rw-r--r--playbooks/openshift-hosted/private/openshift_hosted_router.yml (renamed from playbooks/common/openshift-cluster/openshift_hosted_router.yml)0
l---------playbooks/openshift-hosted/private/roles (renamed from playbooks/byo/openshift-master/roles)0
-rw-r--r--playbooks/openshift-loadbalancer/config.yml4
-rw-r--r--playbooks/openshift-master/additional_config.yml4
-rw-r--r--playbooks/openshift-master/certificates.yml4
-rw-r--r--playbooks/openshift-master/config.yml4
-rw-r--r--playbooks/openshift-master/private/additional_config.yml (renamed from playbooks/common/openshift-master/additional_config.yml)0
-rw-r--r--playbooks/openshift-master/private/certificates.yml (renamed from playbooks/common/openshift-master/certificates.yml)0
-rw-r--r--playbooks/openshift-master/private/config.yml (renamed from playbooks/common/openshift-master/config.yml)0
l---------playbooks/openshift-master/private/filter_plugins (renamed from playbooks/byo/openshift-master/filter_plugins)0
l---------playbooks/openshift-master/private/library (renamed from playbooks/common/openshift-master/library)0
l---------playbooks/openshift-master/private/lookup_plugins (renamed from playbooks/byo/openshift-master/lookup_plugins)0
-rw-r--r--playbooks/openshift-master/private/restart.yml (renamed from playbooks/common/openshift-master/restart.yml)0
-rw-r--r--playbooks/openshift-master/private/restart_hosts.yml (renamed from playbooks/common/openshift-master/restart_hosts.yml)0
-rw-r--r--playbooks/openshift-master/private/restart_services.yml (renamed from playbooks/common/openshift-master/restart_services.yml)0
-rw-r--r--playbooks/openshift-master/private/revert-client-ca.yml (renamed from playbooks/common/openshift-master/revert-client-ca.yml)0
l---------playbooks/openshift-master/private/roles (renamed from playbooks/common/openshift-master/roles)0
-rw-r--r--playbooks/openshift-master/private/scaleup.yml (renamed from playbooks/common/openshift-master/scaleup.yml)4
-rw-r--r--playbooks/openshift-master/private/set_network_facts.yml (renamed from playbooks/common/openshift-master/set_network_facts.yml)0
-rw-r--r--playbooks/openshift-master/private/tasks/wire_aggregator.yml (renamed from playbooks/common/openshift-master/tasks/wire_aggregator.yml)0
-rw-r--r--playbooks/openshift-master/private/templates/openshift-ansible-catalog-console.js (renamed from playbooks/common/openshift-master/templates/openshift-ansible-catalog-console.js)0
-rw-r--r--playbooks/openshift-master/private/validate_restart.yml (renamed from playbooks/common/openshift-master/validate_restart.yml)0
-rw-r--r--playbooks/openshift-master/restart.yml4
-rw-r--r--playbooks/openshift-master/scaleup.yml (renamed from playbooks/byo/openshift-master/scaleup.yml)6
-rw-r--r--playbooks/openshift-prometheus/config.yml4
-rw-r--r--playbooks/openshift-prometheus/private/config.yml (renamed from playbooks/common/openshift-cluster/openshift_prometheus.yml)2
l---------playbooks/openshift-prometheus/private/roles1
-rw-r--r--playbooks/prerequisites.yml7
-rw-r--r--roles/etcd/defaults/main.yaml4
-rw-r--r--roles/etcd/tasks/main.yml8
-rw-r--r--roles/etcd/tasks/restart.yml21
-rw-r--r--roles/etcd/tasks/version_detect.yml55
-rw-r--r--roles/installer_checkpoint/README.md2
-rw-r--r--roles/installer_checkpoint/callback_plugins/installer_checkpoint.py8
-rw-r--r--roles/openshift_loadbalancer/tasks/main.yml3
-rw-r--r--roles/openshift_prometheus/tasks/install_prometheus.yaml22
-rw-r--r--roles/openshift_prometheus/tasks/main.yaml6
-rw-r--r--roles/openshift_prometheus/tasks/uninstall_prometheus.yaml7
-rw-r--r--roles/os_firewall/tasks/main.yml4
82 files changed, 191 insertions, 186 deletions
diff --git a/playbooks/aws/openshift-cluster/hosted.yml b/playbooks/aws/openshift-cluster/hosted.yml
index 9f65925fb..fbef9c3d0 100644
--- a/playbooks/aws/openshift-cluster/hosted.yml
+++ b/playbooks/aws/openshift-cluster/hosted.yml
@@ -1,5 +1,5 @@
---
-- include: ../../common/openshift-cluster/openshift_hosted.yml
+- include: ../../openshift-hosted/private/config.yml
- include: ../../openshift-metrics/private/config.yml
when: openshift_metrics_install_metrics | default(false) | bool
@@ -7,6 +7,9 @@
- include: ../../common/openshift-cluster/openshift_logging.yml
when: openshift_logging_install_logging | default(false) | bool
+- include: ../../openshift-prometheus/private/config.yml
+ when: openshift_hosted_prometheus_deploy | default(false) | bool
+
- include: ../../common/openshift-cluster/service_catalog.yml
when: openshift_enable_service_catalog | default(false) | bool
diff --git a/playbooks/aws/openshift-cluster/install.yml b/playbooks/aws/openshift-cluster/install.yml
index 56ca25eb4..6c177bd21 100644
--- a/playbooks/aws/openshift-cluster/install.yml
+++ b/playbooks/aws/openshift-cluster/install.yml
@@ -33,10 +33,10 @@
when: groups.oo_lb_to_config | default([]) | count > 0
- name: include openshift-master config
- include: ../../common/openshift-master/config.yml
+ include: ../../openshift-master/private/config.yml
- name: include master additional config
- include: ../../common/openshift-master/additional_config.yml
+ include: ../../openshift-master/private/additional_config.yml
- name: include master additional config
include: ../../openshift-node/private/config.yml
diff --git a/playbooks/byo/openshift-cluster/openshift-hosted.yml b/playbooks/byo/openshift-cluster/openshift-hosted.yml
deleted file mode 100644
index 0855a2fb6..000000000
--- a/playbooks/byo/openshift-cluster/openshift-hosted.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- include: ../../init/main.yml
-
-- include: ../../common/openshift-cluster/openshift_hosted.yml
diff --git a/playbooks/byo/openshift-cluster/openshift-prometheus.yml b/playbooks/byo/openshift-cluster/openshift-prometheus.yml
deleted file mode 100644
index 634ee2a80..000000000
--- a/playbooks/byo/openshift-cluster/openshift-prometheus.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- include: ../../init/main.yml
-
-- include: ../../common/openshift-cluster/openshift_prometheus.yml
diff --git a/playbooks/byo/openshift-cluster/redeploy-certificates.yml b/playbooks/byo/openshift-cluster/redeploy-certificates.yml
index 46bdead08..c26f11772 100644
--- a/playbooks/byo/openshift-cluster/redeploy-certificates.yml
+++ b/playbooks/byo/openshift-cluster/redeploy-certificates.yml
@@ -13,7 +13,7 @@
- include: ../../common/openshift-cluster/redeploy-certificates/masters-backup.yml
-- include: ../../common/openshift-master/certificates.yml
+- include: ../../openshift-master/private/certificates.yml
vars:
openshift_certificates_redeploy: true
@@ -27,7 +27,7 @@
vars:
g_etcd_certificates_expired: "{{ ('expired' in (hostvars | oo_select_keys(groups['etcd']) | oo_collect('check_results.check_results.etcd') | oo_collect('health'))) | bool }}"
-- include: ../../common/openshift-master/restart.yml
+- include: ../../openshift-master/private/restart.yml
- include: ../../openshift-node/private/restart.yml
@@ -37,6 +37,6 @@
- include: ../../common/openshift-cluster/redeploy-certificates/registry.yml
when: openshift_hosted_manage_registry | default(true) | bool
-- include: ../../common/openshift-master/revert-client-ca.yml
+- include: ../../openshift-master/private/revert-client-ca.yml
-- include: ../../common/openshift-master/restart.yml
+- include: ../../openshift-master/private/restart.yml
diff --git a/playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml b/playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml
index f9d12251f..94e50cc28 100644
--- a/playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml
+++ b/playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml
@@ -15,4 +15,4 @@
vars:
g_etcd_certificates_expired: "{{ ('expired' in (hostvars | oo_select_keys(groups['etcd']) | oo_collect('check_results.check_results.etcd') | oo_collect('health'))) | bool }}"
-- include: ../../common/openshift-master/restart.yml
+- include: ../../openshift-master/private/restart.yml
diff --git a/playbooks/byo/openshift-cluster/redeploy-master-certificates.yml b/playbooks/byo/openshift-cluster/redeploy-master-certificates.yml
index 6a4528b7f..88e52f809 100644
--- a/playbooks/byo/openshift-cluster/redeploy-master-certificates.yml
+++ b/playbooks/byo/openshift-cluster/redeploy-master-certificates.yml
@@ -3,8 +3,8 @@
- include: ../../common/openshift-cluster/redeploy-certificates/masters-backup.yml
-- include: ../../common/openshift-master/certificates.yml
+- include: ../../openshift-master/private/certificates.yml
vars:
openshift_certificates_redeploy: true
-- include: ../../common/openshift-master/restart.yml
+- include: ../../openshift-master/private/restart.yml
diff --git a/playbooks/byo/openshift-master/additional_config.yml b/playbooks/byo/openshift-master/additional_config.yml
deleted file mode 100644
index 1454190b2..000000000
--- a/playbooks/byo/openshift-master/additional_config.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- include: ../../init/main.yml
-
-- include: ../../common/openshift-master/additional_config.yml
diff --git a/playbooks/byo/openshift-master/certificates.yml b/playbooks/byo/openshift-master/certificates.yml
deleted file mode 100644
index 344985244..000000000
--- a/playbooks/byo/openshift-master/certificates.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- include: ../../init/main.yml
-
-- include: ../../common/openshift-master/certificates.yml
diff --git a/playbooks/byo/openshift-master/config.yml b/playbooks/byo/openshift-master/config.yml
deleted file mode 100644
index 913525e65..000000000
--- a/playbooks/byo/openshift-master/config.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- include: ../../init/main.yml
-
-- include: ../../common/openshift-master/config.yml
diff --git a/playbooks/byo/openshift-master/restart.yml b/playbooks/byo/openshift-master/restart.yml
deleted file mode 100644
index d2031d928..000000000
--- a/playbooks/byo/openshift-master/restart.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- include: ../../init/main.yml
-
-- include: ../../common/openshift-master/restart.yml
diff --git a/playbooks/common/openshift-cluster/config.yml b/playbooks/common/openshift-cluster/config.yml
index a98b1df5f..c14dcd318 100644
--- a/playbooks/common/openshift-cluster/config.yml
+++ b/playbooks/common/openshift-cluster/config.yml
@@ -9,16 +9,16 @@
- include: ../../openshift-loadbalancer/private/config.yml
when: groups.oo_lb_to_config | default([]) | count > 0
-- include: ../openshift-master/config.yml
+- include: ../../openshift-master/private/config.yml
-- include: ../openshift-master/additional_config.yml
+- include: ../../openshift-master/private/additional_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-hosted/private/config.yml
- include: ../../openshift-metrics/private/config.yml
when: openshift_metrics_install_metrics | default(false) | bool
@@ -26,6 +26,9 @@
- include: openshift_logging.yml
when: openshift_logging_install_logging | default(false) | bool
+- include: ../../openshift-prometheus/private/config.yml
+ when: openshift_hosted_prometheus_deploy | default(false) | bool
+
- include: service_catalog.yml
when: openshift_enable_service_catalog | default(true) | bool
diff --git a/playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml b/playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml
index 41e19f5d6..5a13dbb90 100644
--- a/playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml
+++ b/playbooks/common/openshift-cluster/redeploy-certificates/etcd-ca.yml
@@ -41,7 +41,6 @@
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 }}"
@@ -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
@@ -84,7 +82,7 @@
state: absent
changed_when: false
-- include: ../../openshift-master/restart.yml
+- include: ../../../openshift-master/private/restart.yml
# Do not restart masters when master or etcd certificates were previously expired.
when:
# masters
diff --git a/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml b/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
index b58bf3c91..5a837d80d 100644
--- a/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
+++ b/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
@@ -207,7 +207,7 @@
group: "{{ 'root' if item == 'root' else _ansible_ssh_user_gid.stdout }}"
with_items: "{{ client_users }}"
-- include: ../../openshift-master/restart.yml
+- include: ../../../openshift-master/private/restart.yml
# Do not restart masters when master or etcd certificates were previously expired.
when:
# masters
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 c76b3053d..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:
@@ -109,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-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
index fa65567c2..52438bdc4 100644
--- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
@@ -85,10 +85,10 @@
- include: "{{ openshift_master_upgrade_hook }}"
when: openshift_master_upgrade_hook is defined
- - include: ../../openshift-master/restart_hosts.yml
+ - include: ../../../openshift-master/private/restart_hosts.yml
when: openshift.common.rolling_restart_mode == 'system'
- - include: ../../openshift-master/restart_services.yml
+ - include: ../../../openshift-master/private/restart_services.yml
when: openshift.common.rolling_restart_mode == 'services'
# Run the post-upgrade hook if defined:
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml
index ef52f214b..6cb6a665f 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml
@@ -79,7 +79,7 @@
# docker is configured and running.
skip_docker_role: True
-- include: ../../../openshift-master/validate_restart.yml
+- include: ../../../../openshift-master/private/validate_restart.yml
tags:
- pre_upgrade
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml
index 4c6646a38..8f48bedcc 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml
@@ -83,7 +83,7 @@
# docker is configured and running.
skip_docker_role: True
-- include: ../../../openshift-master/validate_restart.yml
+- include: ../../../../openshift-master/private/validate_restart.yml
tags:
- pre_upgrade
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml
index e3c012380..2b99568c7 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml
@@ -83,7 +83,7 @@
# docker is configured and running.
skip_docker_role: True
-- include: ../../../openshift-master/validate_restart.yml
+- include: ../../../../openshift-master/private/validate_restart.yml
tags:
- pre_upgrade
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
index a88fa7b2e..d3d2046e6 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
@@ -87,7 +87,7 @@
# docker is configured and running.
skip_docker_role: True
-- include: ../../../openshift-master/validate_restart.yml
+- include: ../../../../openshift-master/private/validate_restart.yml
tags:
- pre_upgrade
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml
index 73df15d53..b602cdd0e 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml
@@ -83,7 +83,7 @@
# docker is configured and running.
skip_docker_role: True
-- include: ../../../openshift-master/validate_restart.yml
+- include: ../../../../openshift-master/private/validate_restart.yml
tags:
- pre_upgrade
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml
index 48d55c16f..da81e6dea 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml
@@ -87,7 +87,7 @@
# docker is configured and running.
skip_docker_role: True
-- include: ../../../openshift-master/validate_restart.yml
+- include: ../../../../openshift-master/private/validate_restart.yml
tags:
- pre_upgrade
diff --git a/playbooks/common/openshift-master/filter_plugins b/playbooks/common/openshift-master/filter_plugins
deleted file mode 120000
index 99a95e4ca..000000000
--- a/playbooks/common/openshift-master/filter_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-master/lookup_plugins b/playbooks/common/openshift-master/lookup_plugins
deleted file mode 120000
index ac79701db..000000000
--- a/playbooks/common/openshift-master/lookup_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/init/facts.yml b/playbooks/init/facts.yml
index 0899cc48c..c9a3448c7 100644
--- a/playbooks/init/facts.yml
+++ b/playbooks/init/facts.yml
@@ -31,11 +31,6 @@
l_is_containerized: "{{ (l_is_atomic | bool) or (containerized | default(false) | bool) }}"
l_is_openvswitch_system_container: "{{ (openshift_use_openvswitch_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
l_is_master_system_container: "{{ (openshift_use_master_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
- l_is_etcd_system_container: "{{ (openshift_use_etcd_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
-
- - name: initialize_facts set fact for l_etcd_runtime
- set_fact:
- l_etcd_runtime: "{{ 'runc' if l_is_etcd_system_container else 'docker' if l_is_containerized else 'host' }}"
# TODO: Should this be moved into health checks??
# Seems as though any check that happens with a corresponding fail should move into health_checks
@@ -134,8 +129,6 @@
is_containerized: "{{ l_is_containerized | default(None) }}"
is_openvswitch_system_container: "{{ l_is_openvswitch_system_container | default(false) }}"
is_master_system_container: "{{ l_is_master_system_container | default(false) }}"
- is_etcd_system_container: "{{ l_is_etcd_system_container | default(false) }}"
- etcd_runtime: "{{ l_etcd_runtime }}"
system_images_registry: "{{ system_images_registry }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
public_ip: "{{ openshift_public_ip | default(None) }}"
diff --git a/playbooks/openshift-etcd/private/config.yml b/playbooks/openshift-etcd/private/config.yml
index 3fe483785..2e202e5a1 100644
--- a/playbooks/openshift-etcd/private/config.yml
+++ b/playbooks/openshift-etcd/private/config.yml
@@ -24,7 +24,6 @@
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
diff --git a/playbooks/openshift-etcd/private/embedded2external.yml b/playbooks/openshift-etcd/private/embedded2external.yml
index 0bd9912b0..410b0cae2 100644
--- a/playbooks/openshift-etcd/private/embedded2external.yml
+++ b/playbooks/openshift-etcd/private/embedded2external.yml
@@ -36,7 +36,6 @@
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 }}"
@@ -45,7 +44,6 @@
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 }}"
@@ -78,13 +76,9 @@
- 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
@@ -101,7 +95,6 @@
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 }}"
@@ -112,7 +105,6 @@
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 }}"
@@ -134,7 +126,6 @@
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 }}"
@@ -142,7 +133,6 @@
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 }}"
diff --git a/playbooks/openshift-etcd/private/master_etcd_certificates.yml b/playbooks/openshift-etcd/private/master_etcd_certificates.yml
index 0a25aac57..d98470db2 100644
--- a/playbooks/openshift-etcd/private/master_etcd_certificates.yml
+++ b/playbooks/openshift-etcd/private/master_etcd_certificates.yml
@@ -10,5 +10,4 @@
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/openshift-etcd/private/migrate.yml b/playbooks/openshift-etcd/private/migrate.yml
index 31362f2f6..2dac626bc 100644
--- a/playbooks/openshift-etcd/private/migrate.yml
+++ b/playbooks/openshift-etcd/private/migrate.yml
@@ -48,7 +48,6 @@
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') }}"
@@ -76,8 +75,6 @@
- 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]
diff --git a/playbooks/openshift-etcd/private/restart.yml b/playbooks/openshift-etcd/private/restart.yml
index 5eaea5ae8..0751480e2 100644
--- a/playbooks/openshift-etcd/private/restart.yml
+++ b/playbooks/openshift-etcd/private/restart.yml
@@ -3,25 +3,17 @@
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
+ - include_role:
+ name: etcd
+ tasks_from: restart.yml
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
+ - include_role:
+ name: etcd
+ tasks_from: restart.yml
when:
- g_etcd_certificates_expired | default(false) | bool
diff --git a/playbooks/openshift-etcd/private/scaleup.yml b/playbooks/openshift-etcd/private/scaleup.yml
index 20061366c..fac8e3f02 100644
--- a/playbooks/openshift-etcd/private/scaleup.yml
+++ b/playbooks/openshift-etcd/private/scaleup.yml
@@ -36,7 +36,6 @@
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
@@ -48,7 +47,6 @@
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:
diff --git a/playbooks/openshift-etcd/private/server_certificates.yml b/playbooks/openshift-etcd/private/server_certificates.yml
index 10e06747b..14c74baf3 100644
--- a/playbooks/openshift-etcd/private/server_certificates.yml
+++ b/playbooks/openshift-etcd/private/server_certificates.yml
@@ -12,4 +12,3 @@
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/openshift-hosted/config.yml b/playbooks/openshift-hosted/config.yml
new file mode 100644
index 000000000..8ee57ce8d
--- /dev/null
+++ b/playbooks/openshift-hosted/config.yml
@@ -0,0 +1,4 @@
+---
+- include: ../init/main.yml
+
+- include: private/config.yml
diff --git a/playbooks/common/openshift-cluster/cockpit-ui.yml b/playbooks/openshift-hosted/private/cockpit-ui.yml
index 359132dd0..359132dd0 100644
--- a/playbooks/common/openshift-cluster/cockpit-ui.yml
+++ b/playbooks/openshift-hosted/private/cockpit-ui.yml
diff --git a/playbooks/common/openshift-cluster/openshift_hosted.yml b/playbooks/openshift-hosted/private/config.yml
index 15ee60dc0..6bcd02ba2 100644
--- a/playbooks/common/openshift-cluster/openshift_hosted.yml
+++ b/playbooks/openshift-hosted/private/config.yml
@@ -23,9 +23,6 @@
- include: cockpit-ui.yml
-- include: openshift_prometheus.yml
- when: openshift_hosted_prometheus_deploy | default(False) | bool
-
- include: install_docker_gc.yml
when:
- openshift_use_crio | default(False) | bool
diff --git a/playbooks/common/openshift-cluster/create_persistent_volumes.yml b/playbooks/openshift-hosted/private/create_persistent_volumes.yml
index 8a60a30b8..8a60a30b8 100644
--- a/playbooks/common/openshift-cluster/create_persistent_volumes.yml
+++ b/playbooks/openshift-hosted/private/create_persistent_volumes.yml
diff --git a/playbooks/common/openshift-cluster/install_docker_gc.yml b/playbooks/openshift-hosted/private/install_docker_gc.yml
index 1e3dfee07..1e3dfee07 100644
--- a/playbooks/common/openshift-cluster/install_docker_gc.yml
+++ b/playbooks/openshift-hosted/private/install_docker_gc.yml
diff --git a/playbooks/common/openshift-cluster/openshift_default_storage_class.yml b/playbooks/openshift-hosted/private/openshift_default_storage_class.yml
index 62fe0dd60..62fe0dd60 100644
--- a/playbooks/common/openshift-cluster/openshift_default_storage_class.yml
+++ b/playbooks/openshift-hosted/private/openshift_default_storage_class.yml
diff --git a/playbooks/common/openshift-cluster/openshift_hosted_create_projects.yml b/playbooks/openshift-hosted/private/openshift_hosted_create_projects.yml
index d5ca5185c..d5ca5185c 100644
--- a/playbooks/common/openshift-cluster/openshift_hosted_create_projects.yml
+++ b/playbooks/openshift-hosted/private/openshift_hosted_create_projects.yml
diff --git a/playbooks/common/openshift-cluster/openshift_hosted_registry.yml b/playbooks/openshift-hosted/private/openshift_hosted_registry.yml
index 2a91a827c..2a91a827c 100644
--- a/playbooks/common/openshift-cluster/openshift_hosted_registry.yml
+++ b/playbooks/openshift-hosted/private/openshift_hosted_registry.yml
diff --git a/playbooks/common/openshift-cluster/openshift_hosted_router.yml b/playbooks/openshift-hosted/private/openshift_hosted_router.yml
index bcb5a34a4..bcb5a34a4 100644
--- a/playbooks/common/openshift-cluster/openshift_hosted_router.yml
+++ b/playbooks/openshift-hosted/private/openshift_hosted_router.yml
diff --git a/playbooks/byo/openshift-master/roles b/playbooks/openshift-hosted/private/roles
index 20c4c58cf..20c4c58cf 120000
--- a/playbooks/byo/openshift-master/roles
+++ b/playbooks/openshift-hosted/private/roles
diff --git a/playbooks/openshift-loadbalancer/config.yml b/playbooks/openshift-loadbalancer/config.yml
index 8ee57ce8d..c7814207c 100644
--- a/playbooks/openshift-loadbalancer/config.yml
+++ b/playbooks/openshift-loadbalancer/config.yml
@@ -1,4 +1,4 @@
---
-- include: ../init/main.yml
+- import_playbook: ../init/main.yml
-- include: private/config.yml
+- import_playbook: private/config.yml
diff --git a/playbooks/openshift-master/additional_config.yml b/playbooks/openshift-master/additional_config.yml
new file mode 100644
index 000000000..e43e9e002
--- /dev/null
+++ b/playbooks/openshift-master/additional_config.yml
@@ -0,0 +1,4 @@
+---
+- include: ../init/main.yml
+
+- include: private/additional_config.yml
diff --git a/playbooks/openshift-master/certificates.yml b/playbooks/openshift-master/certificates.yml
new file mode 100644
index 000000000..0384877d9
--- /dev/null
+++ b/playbooks/openshift-master/certificates.yml
@@ -0,0 +1,4 @@
+---
+- include: ../init/main.yml
+
+- include: private/certificates.yml
diff --git a/playbooks/openshift-master/config.yml b/playbooks/openshift-master/config.yml
new file mode 100644
index 000000000..8ee57ce8d
--- /dev/null
+++ b/playbooks/openshift-master/config.yml
@@ -0,0 +1,4 @@
+---
+- include: ../init/main.yml
+
+- include: private/config.yml
diff --git a/playbooks/common/openshift-master/additional_config.yml b/playbooks/openshift-master/private/additional_config.yml
index 32f638d42..32f638d42 100644
--- a/playbooks/common/openshift-master/additional_config.yml
+++ b/playbooks/openshift-master/private/additional_config.yml
diff --git a/playbooks/common/openshift-master/certificates.yml b/playbooks/openshift-master/private/certificates.yml
index f6afbc36f..f6afbc36f 100644
--- a/playbooks/common/openshift-master/certificates.yml
+++ b/playbooks/openshift-master/private/certificates.yml
diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/openshift-master/private/config.yml
index 6b0fd6b7c..6b0fd6b7c 100644
--- a/playbooks/common/openshift-master/config.yml
+++ b/playbooks/openshift-master/private/config.yml
diff --git a/playbooks/byo/openshift-master/filter_plugins b/playbooks/openshift-master/private/filter_plugins
index 99a95e4ca..99a95e4ca 120000
--- a/playbooks/byo/openshift-master/filter_plugins
+++ b/playbooks/openshift-master/private/filter_plugins
diff --git a/playbooks/common/openshift-master/library b/playbooks/openshift-master/private/library
index d0b7393d3..d0b7393d3 120000
--- a/playbooks/common/openshift-master/library
+++ b/playbooks/openshift-master/private/library
diff --git a/playbooks/byo/openshift-master/lookup_plugins b/playbooks/openshift-master/private/lookup_plugins
index ac79701db..ac79701db 120000
--- a/playbooks/byo/openshift-master/lookup_plugins
+++ b/playbooks/openshift-master/private/lookup_plugins
diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/openshift-master/private/restart.yml
index 4d73b8124..4d73b8124 100644
--- a/playbooks/common/openshift-master/restart.yml
+++ b/playbooks/openshift-master/private/restart.yml
diff --git a/playbooks/common/openshift-master/restart_hosts.yml b/playbooks/openshift-master/private/restart_hosts.yml
index a5dbe0590..a5dbe0590 100644
--- a/playbooks/common/openshift-master/restart_hosts.yml
+++ b/playbooks/openshift-master/private/restart_hosts.yml
diff --git a/playbooks/common/openshift-master/restart_services.yml b/playbooks/openshift-master/private/restart_services.yml
index 4e1b3a3be..4e1b3a3be 100644
--- a/playbooks/common/openshift-master/restart_services.yml
+++ b/playbooks/openshift-master/private/restart_services.yml
diff --git a/playbooks/common/openshift-master/revert-client-ca.yml b/playbooks/openshift-master/private/revert-client-ca.yml
index 9ae23bf5b..9ae23bf5b 100644
--- a/playbooks/common/openshift-master/revert-client-ca.yml
+++ b/playbooks/openshift-master/private/revert-client-ca.yml
diff --git a/playbooks/common/openshift-master/roles b/playbooks/openshift-master/private/roles
index e2b799b9d..e2b799b9d 120000
--- a/playbooks/common/openshift-master/roles
+++ b/playbooks/openshift-master/private/roles
diff --git a/playbooks/common/openshift-master/scaleup.yml b/playbooks/openshift-master/private/scaleup.yml
index ed54e6ca4..021399965 100644
--- a/playbooks/common/openshift-master/scaleup.yml
+++ b/playbooks/openshift-master/private/scaleup.yml
@@ -44,11 +44,11 @@
delay: 1
changed_when: false
-- include: ../openshift-master/set_network_facts.yml
+- include: set_network_facts.yml
- include: ../../openshift-etcd/private/certificates.yml
-- include: ../openshift-master/config.yml
+- include: config.yml
- include: ../../openshift-loadbalancer/private/config.yml
diff --git a/playbooks/common/openshift-master/set_network_facts.yml b/playbooks/openshift-master/private/set_network_facts.yml
index 9a6cf26fc..9a6cf26fc 100644
--- a/playbooks/common/openshift-master/set_network_facts.yml
+++ b/playbooks/openshift-master/private/set_network_facts.yml
diff --git a/playbooks/common/openshift-master/tasks/wire_aggregator.yml b/playbooks/openshift-master/private/tasks/wire_aggregator.yml
index 97acc5d5d..97acc5d5d 100644
--- a/playbooks/common/openshift-master/tasks/wire_aggregator.yml
+++ b/playbooks/openshift-master/private/tasks/wire_aggregator.yml
diff --git a/playbooks/common/openshift-master/templates/openshift-ansible-catalog-console.js b/playbooks/openshift-master/private/templates/openshift-ansible-catalog-console.js
index fd02325ba..fd02325ba 100644
--- a/playbooks/common/openshift-master/templates/openshift-ansible-catalog-console.js
+++ b/playbooks/openshift-master/private/templates/openshift-ansible-catalog-console.js
diff --git a/playbooks/common/openshift-master/validate_restart.yml b/playbooks/openshift-master/private/validate_restart.yml
index 5dbb21502..5dbb21502 100644
--- a/playbooks/common/openshift-master/validate_restart.yml
+++ b/playbooks/openshift-master/private/validate_restart.yml
diff --git a/playbooks/openshift-master/restart.yml b/playbooks/openshift-master/restart.yml
new file mode 100644
index 000000000..5e28e274e
--- /dev/null
+++ b/playbooks/openshift-master/restart.yml
@@ -0,0 +1,4 @@
+---
+- include: ../init/main.yml
+
+- include: private/restart.yml
diff --git a/playbooks/byo/openshift-master/scaleup.yml b/playbooks/openshift-master/scaleup.yml
index 4fdec5e7d..aa0dd8094 100644
--- a/playbooks/byo/openshift-master/scaleup.yml
+++ b/playbooks/openshift-master/scaleup.yml
@@ -1,5 +1,5 @@
---
-- include: ../../init/evaluate_groups.yml
+- include: ../init/evaluate_groups.yml
- name: Ensure there are new_masters or new_nodes
hosts: localhost
@@ -18,6 +18,6 @@
# Need a better way to do the above check for node without
# running evaluate_groups and init/main.yml
-- include: ../../init/main.yml
+- include: ../init/main.yml
-- include: ../../common/openshift-master/scaleup.yml
+- include: private/scaleup.yml
diff --git a/playbooks/openshift-prometheus/config.yml b/playbooks/openshift-prometheus/config.yml
new file mode 100644
index 000000000..8ee57ce8d
--- /dev/null
+++ b/playbooks/openshift-prometheus/config.yml
@@ -0,0 +1,4 @@
+---
+- include: ../init/main.yml
+
+- include: private/config.yml
diff --git a/playbooks/common/openshift-cluster/openshift_prometheus.yml b/playbooks/openshift-prometheus/private/config.yml
index 7aa9a16e6..d13261a7a 100644
--- a/playbooks/common/openshift-cluster/openshift_prometheus.yml
+++ b/playbooks/openshift-prometheus/private/config.yml
@@ -11,7 +11,7 @@
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
-- name: Create Hosted Resources - openshift_prometheus
+- name: OpenShift Prometheus
hosts: oo_first_master
roles:
- role: openshift_prometheus
diff --git a/playbooks/openshift-prometheus/private/roles b/playbooks/openshift-prometheus/private/roles
new file mode 120000
index 000000000..20c4c58cf
--- /dev/null
+++ b/playbooks/openshift-prometheus/private/roles
@@ -0,0 +1 @@
+../../../roles \ No newline at end of file
diff --git a/playbooks/prerequisites.yml b/playbooks/prerequisites.yml
new file mode 100644
index 000000000..582dfe794
--- /dev/null
+++ b/playbooks/prerequisites.yml
@@ -0,0 +1,7 @@
+---
+- name: Place holder for prerequisites
+ hosts: localhost
+ gather_facts: false
+ tasks:
+ - name: Debug placeholder
+ debug: msg="Prerequisites ran."
diff --git a/roles/etcd/defaults/main.yaml b/roles/etcd/defaults/main.yaml
index 9a3652a2b..a069e4d87 100644
--- a/roles/etcd/defaults/main.yaml
+++ b/roles/etcd/defaults/main.yaml
@@ -2,8 +2,10 @@
r_etcd_common_backup_tag: ''
r_etcd_common_backup_sufix_name: ''
+l_is_etcd_system_container: "{{ (openshift_use_etcd_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
+
# runc, docker, host
-r_etcd_common_etcd_runtime: "docker"
+r_etcd_common_etcd_runtime: "{{ 'runc' if l_is_etcd_system_container else 'docker' if l_is_containerized else 'host' }}"
r_etcd_common_embedded_etcd: false
osm_etcd_image: 'registry.access.redhat.com/rhel7/etcd'
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml
index fabe66b91..78ec2cedb 100644
--- a/roles/etcd/tasks/main.yml
+++ b/roles/etcd/tasks/main.yml
@@ -30,7 +30,7 @@
src: etcd.docker.service
when:
- etcd_is_containerized | bool
- - not openshift.common.is_etcd_system_container | bool
+ - not l_is_etcd_system_container | bool
# Start secondary etcd instance for third party integrations
# TODO: Determine an alternative to using thirdparty variable
@@ -90,7 +90,7 @@
enabled: no
masked: yes
daemon_reload: yes
- when: not openshift.common.is_etcd_system_container | bool
+ when: not l_is_etcd_system_container | bool
register: task_result
failed_when: task_result|failed and 'could not' not in task_result.msg|lower
@@ -98,11 +98,11 @@
template:
dest: "/etc/systemd/system/etcd_container.service"
src: etcd.docker.service
- when: not openshift.common.is_etcd_system_container | bool
+ when: not l_is_etcd_system_container | bool
- name: Install Etcd system container
include: system_container.yml
- when: openshift.common.is_etcd_system_container | bool
+ when: l_is_etcd_system_container | bool
when: etcd_is_containerized | bool
- name: Validate permissions on the config dir
diff --git a/roles/etcd/tasks/restart.yml b/roles/etcd/tasks/restart.yml
new file mode 100644
index 000000000..d4a016eec
--- /dev/null
+++ b/roles/etcd/tasks/restart.yml
@@ -0,0 +1,21 @@
+---
+
+- name: restart etcd
+ service:
+ name: "{{ etcd_service }}"
+ state: restarted
+ when:
+ - not g_etcd_certificates_expired | default(false) | bool
+
+- name: stop etcd
+ service:
+ name: "{{ etcd_service }}"
+ state: stopped
+ when:
+ - g_etcd_certificates_expired | default(false) | bool
+- name: start etcd
+ service:
+ name: "{{ etcd_service }}"
+ state: started
+ when:
+ - g_etcd_certificates_expired | default(false) | bool
diff --git a/roles/etcd/tasks/version_detect.yml b/roles/etcd/tasks/version_detect.yml
new file mode 100644
index 000000000..fe1e418d8
--- /dev/null
+++ b/roles/etcd/tasks/version_detect.yml
@@ -0,0 +1,55 @@
+---
+- 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 l_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 l_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:
+ - l_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:
+ - l_is_etcd_system_container | bool
+
+ - debug:
+ msg: "Etcd containerized version {{ etcd_container_version }} detected"
+ when:
+ - openshift.common.is_containerized | bool
diff --git a/roles/installer_checkpoint/README.md b/roles/installer_checkpoint/README.md
index 6426cd545..68c0357b6 100644
--- a/roles/installer_checkpoint/README.md
+++ b/roles/installer_checkpoint/README.md
@@ -160,7 +160,7 @@ Health Check : Complete (0:01:10)
etcd Install : Complete (0:02:58)
Master Install : Complete (0:09:20)
Master Additional Install : In Progress (0:20:04)
- This phase can be restarted by running: playbooks/byo/openshift-master/additional_config.yml
+ This phase can be restarted by running: playbooks/openshift-master/additional_config.yml
```
[set_stats]: http://docs.ansible.com/ansible/latest/set_stats_module.html
diff --git a/roles/installer_checkpoint/callback_plugins/installer_checkpoint.py b/roles/installer_checkpoint/callback_plugins/installer_checkpoint.py
index 3772be5d8..c332a8ac2 100644
--- a/roles/installer_checkpoint/callback_plugins/installer_checkpoint.py
+++ b/roles/installer_checkpoint/callback_plugins/installer_checkpoint.py
@@ -62,11 +62,11 @@ class CallbackModule(CallbackBase):
},
'installer_phase_master': {
'title': 'Master Install',
- 'playbook': 'playbooks/byo/openshift-master/config.yml'
+ 'playbook': 'playbooks/openshift-master/config.yml'
},
'installer_phase_master_additional': {
'title': 'Master Additional Install',
- 'playbook': 'playbooks/byo/openshift-master/additional_config.yml'
+ 'playbook': 'playbooks/openshift-master/additional_config.yml'
},
'installer_phase_node': {
'title': 'Node Install',
@@ -78,7 +78,7 @@ class CallbackModule(CallbackBase):
},
'installer_phase_hosted': {
'title': 'Hosted Install',
- 'playbook': 'playbooks/byo/openshift-cluster/openshift-hosted.yml'
+ 'playbook': 'playbooks/openshift-hosted/config.yml'
},
'installer_phase_metrics': {
'title': 'Metrics Install',
@@ -90,7 +90,7 @@ class CallbackModule(CallbackBase):
},
'installer_phase_prometheus': {
'title': 'Prometheus Install',
- 'playbook': 'playbooks/byo/openshift-cluster/openshift-prometheus.yml'
+ 'playbook': 'playbooks/openshift-prometheus/config.yml'
},
'installer_phase_servicecatalog': {
'title': 'Service Catalog Install',
diff --git a/roles/openshift_loadbalancer/tasks/main.yml b/roles/openshift_loadbalancer/tasks/main.yml
index 69b061fc5..c87a327a4 100644
--- a/roles/openshift_loadbalancer/tasks/main.yml
+++ b/roles/openshift_loadbalancer/tasks/main.yml
@@ -1,7 +1,6 @@
---
- name: setup firewall
- include: firewall.yml
- static: yes
+ import_tasks: firewall.yml
- name: Install haproxy
package: name=haproxy state=present
diff --git a/roles/openshift_prometheus/tasks/install_prometheus.yaml b/roles/openshift_prometheus/tasks/install_prometheus.yaml
index 21da4bc9d..50736a9ee 100644
--- a/roles/openshift_prometheus/tasks/install_prometheus.yaml
+++ b/roles/openshift_prometheus/tasks/install_prometheus.yaml
@@ -3,7 +3,7 @@
# namespace
- name: Add prometheus project
oc_project:
- state: "{{ state }}"
+ state: present
name: "{{ openshift_prometheus_namespace }}"
node_selector: "{{ openshift_prometheus_node_selector | oo_selector_to_string_list() }}"
description: Prometheus
@@ -11,7 +11,7 @@
# secrets
- name: Set alert and prometheus secrets
oc_secret:
- state: "{{ state }}"
+ state: present
name: "{{ item }}-proxy"
namespace: "{{ openshift_prometheus_namespace }}"
contents:
@@ -24,7 +24,7 @@
# serviceaccount
- name: create prometheus serviceaccount
oc_serviceaccount:
- state: "{{ state }}"
+ state: present
name: prometheus
namespace: "{{ openshift_prometheus_namespace }}"
# TODO add annotations when supproted
@@ -48,7 +48,7 @@
# create clusterrolebinding for prometheus serviceaccount
- name: Set cluster-reader permissions for prometheus
oc_adm_policy_user:
- state: "{{ state }}"
+ state: present
namespace: "{{ openshift_prometheus_namespace }}"
resource_kind: cluster-role
resource_name: cluster-reader
@@ -58,7 +58,7 @@
# TODO join into 1 task with loop
- name: Create prometheus service
oc_service:
- state: "{{ state }}"
+ state: present
name: "{{ item.name }}"
namespace: "{{ openshift_prometheus_namespace }}"
selector:
@@ -76,7 +76,7 @@
- name: Create alerts service
oc_service:
- state: "{{ state }}"
+ state: present
name: "{{ item.name }}"
namespace: "{{ openshift_prometheus_namespace }}"
selector:
@@ -111,7 +111,7 @@
# create prometheus and alerts routes
- name: create prometheus and alerts routes
oc_route:
- state: "{{ state }}"
+ state: present
name: "{{ item.name }}"
namespace: "{{ openshift_prometheus_namespace }}"
service_name: "{{ item.name }}"
@@ -185,7 +185,7 @@
# In prometheus configmap create "additional.rules" section if file exists
- name: Set prometheus configmap
oc_configmap:
- state: "{{ state }}"
+ state: present
name: "prometheus"
namespace: "{{ openshift_prometheus_namespace }}"
from_file:
@@ -196,7 +196,7 @@
- name: Set prometheus configmap
oc_configmap:
- state: "{{ state }}"
+ state: present
name: "prometheus"
namespace: "{{ openshift_prometheus_namespace }}"
from_file:
@@ -212,7 +212,7 @@
- name: Set alertmanager configmap
oc_configmap:
- state: "{{ state }}"
+ state: present
name: "prometheus-alerts"
namespace: "{{ openshift_prometheus_namespace }}"
from_file:
@@ -229,7 +229,7 @@
- name: Set prometheus stateful set
oc_obj:
- state: "{{ state }}"
+ state: present
name: "prometheus"
namespace: "{{ openshift_prometheus_namespace }}"
kind: statefulset
diff --git a/roles/openshift_prometheus/tasks/main.yaml b/roles/openshift_prometheus/tasks/main.yaml
index 5cc9a67eb..a62babaa7 100644
--- a/roles/openshift_prometheus/tasks/main.yaml
+++ b/roles/openshift_prometheus/tasks/main.yaml
@@ -21,8 +21,10 @@
changed_when: False
- include: install_prometheus.yaml
- vars:
- state: "{{ openshift_prometheus_state }}"
+ when: openshift_prometheus_state == 'present'
+
+- include: uninstall_prometheus.yaml
+ when: openshift_prometheus_state == 'absent'
- name: Delete temp directory
file:
diff --git a/roles/openshift_prometheus/tasks/uninstall_prometheus.yaml b/roles/openshift_prometheus/tasks/uninstall_prometheus.yaml
new file mode 100644
index 000000000..d746402db
--- /dev/null
+++ b/roles/openshift_prometheus/tasks/uninstall_prometheus.yaml
@@ -0,0 +1,7 @@
+---
+
+# remove namespace - This will delete all the objects inside the namespace
+- name: Remove prometheus project
+ oc_project:
+ state: absent
+ name: "{{ openshift_prometheus_namespace }}"
diff --git a/roles/os_firewall/tasks/main.yml b/roles/os_firewall/tasks/main.yml
index c477d386c..99084cd3f 100644
--- a/roles/os_firewall/tasks/main.yml
+++ b/roles/os_firewall/tasks/main.yml
@@ -8,12 +8,12 @@
set_fact:
r_os_firewall_is_atomic: "{{ r_os_firewall_ostree_booted.stat.exists }}"
-- include: firewalld.yml
+- include_tasks: firewalld.yml
when:
- os_firewall_enabled | bool
- os_firewall_use_firewalld | bool
-- include: iptables.yml
+- include_tasks: iptables.yml
when:
- os_firewall_enabled | bool
- not os_firewall_use_firewalld | bool