From 7742a6f6f19c2165ad4a9b62f5d3c186177a0d8a Mon Sep 17 00:00:00 2001 From: Russell Teague Date: Thu, 19 Jan 2017 11:20:57 -0500 Subject: Cleaning repo cache earlier --- playbooks/common/openshift-cluster/upgrades/init.yml | 17 +++++++++++++++-- .../upgrades/pre/verify_upgrade_targets.yml | 4 ---- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'playbooks/common/openshift-cluster/upgrades') 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 -- cgit v1.2.3