summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2017-01-19 15:32:15 -0500
committerGitHub <noreply@github.com>2017-01-19 15:32:15 -0500
commitf8e567bc6da4088d299af16d74f19767be740b84 (patch)
tree38d994455e3516aeabaf8f08ea69c077257f1c3a /playbooks
parent47e3f2f787cd3c431820b6d1a5037dcfd44d3023 (diff)
parent7742a6f6f19c2165ad4a9b62f5d3c186177a0d8a (diff)
downloadopenshift-f8e567bc6da4088d299af16d74f19767be740b84.tar.gz
openshift-f8e567bc6da4088d299af16d74f19767be740b84.tar.bz2
openshift-f8e567bc6da4088d299af16d74f19767be740b84.tar.xz
openshift-f8e567bc6da4088d299af16d74f19767be740b84.zip
Merge pull request #3126 from mtnbikenc/fix-upgrade-repocache
Cleaning repo cache earlier when upgrading
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade.yml4
-rw-r--r--playbooks/common/openshift-cluster/upgrades/init.yml17
-rw-r--r--playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml4
3 files changed, 17 insertions, 8 deletions
diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade.yml b/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade.yml
index 59dd802ee..6b69348b7 100644
--- a/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade.yml
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade.yml
@@ -6,8 +6,8 @@
tags:
- pre_upgrade
-# Configure the upgrade target for the common upgrade tasks:
-- hosts: l_oo_all_hosts
+- name: Configure the upgrade target for the common upgrade tasks
+ hosts: l_oo_all_hosts
tags:
- pre_upgrade
tasks:
diff --git a/playbooks/common/openshift-cluster/upgrades/init.yml b/playbooks/common/openshift-cluster/upgrades/init.yml
index 8cac2fb3b..76645ff3f 100644
--- a/playbooks/common/openshift-cluster/upgrades/init.yml
+++ b/playbooks/common/openshift-cluster/upgrades/init.yml
@@ -1,5 +1,6 @@
---
-- hosts: localhost
+- name: Create l_oo_all_hosts group
+ hosts: localhost
connection: local
become: no
gather_facts: no
@@ -10,7 +11,8 @@
groups: l_oo_all_hosts
with_items: "{{ g_all_hosts | default([]) }}"
-- hosts: l_oo_all_hosts
+- name: Include g_*_hosts vars for hosts in group l_oo_all_hosts
+ hosts: l_oo_all_hosts
gather_facts: no
tasks:
- include_vars: ../../../byo/openshift-cluster/cluster_hosts.yml
@@ -46,3 +48,14 @@
when: openshift_docker_log_options is not defined
- include: ../initialize_facts.yml
+
+- name: Ensure clean repo cache in the event repos have been changed manually
+ hosts: oo_all_hosts
+ tags:
+ - pre_upgrade
+ tasks:
+ - name: Clean package cache
+ command: "{{ ansible_pkg_mgr }} clean all"
+ when: not openshift.common.is_atomic | bool
+ args:
+ warn: no
diff --git a/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml b/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
index 9632626a4..c83923dae 100644
--- a/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
+++ b/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
@@ -12,10 +12,6 @@
msg: Verify the correct version was found
when: verify_upgrade_version is defined and openshift_version != verify_upgrade_version
- - name: Clean package cache
- command: "{{ ansible_pkg_mgr }} clean all"
- when: not openshift.common.is_atomic | bool
-
- set_fact:
g_new_service_name: "{{ 'origin' if deployment_type =='origin' else 'atomic-openshift' }}"
when: not openshift.common.is_containerized | bool