From 1b18926bbfda48507eb8b4b883c477661512b1eb Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Tue, 21 Jul 2020 08:48:50 +0100 Subject: [PATCH] Remove package cache proxy cleanup This should have been removed in Train so it's really time to get rid of these tasks now. The package cache was retired in Rocky. Change-Id: I98d527b8e804685b8d933de2dc5e2efeb78bbd31 --- .../common-tasks/package-cache-proxy.yml | 75 ------------------- playbooks/containers-lxc-create.yml | 3 - playbooks/containers-nspawn-create.yml | 2 - playbooks/openstack-hosts-setup.yml | 2 - playbooks/os-blazar-install.yml | 4 - playbooks/os-congress-install.yml | 4 - playbooks/os-mistral-install.yml | 4 - playbooks/os-murano-install.yml | 4 - playbooks/os-placement-install.yml | 4 - 9 files changed, 102 deletions(-) delete mode 100644 playbooks/common-tasks/package-cache-proxy.yml diff --git a/playbooks/common-tasks/package-cache-proxy.yml b/playbooks/common-tasks/package-cache-proxy.yml deleted file mode 100644 index 42652a731a..0000000000 --- a/playbooks/common-tasks/package-cache-proxy.yml +++ /dev/null @@ -1,75 +0,0 @@ ---- -# Copyright 2016, Logan Vig -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO(odyssey4me): -# Remove these tasks in T. They are only present for the -# Q->R upgrade or for R->S upgrades for environments which -# were installed prior to R's release. - -- name: Remove apt package manager proxy - file: - dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy" - state: "absent" - register: _apt_proxy_removed - when: - - ansible_os_family == 'Debian' - tags: - - common-proxy - -- name: Update apt when proxy is added/removed - apt: - update_cache: yes - retries: 5 - delay: 2 - when: - - _apt_proxy_removed is mapping - - _apt_proxy_removed is changed - tags: - - common-proxy - -# NOTE(mhayden): We always deploy the proxy configuration for yum on CentOS -# even if dnf is present. -- name: Remove yum package manager proxy - lineinfile: - line: >- - proxy=http://{{ internal_lb_vip_address }}:{{ repo_pkg_cache_port | default('3142') }} - dest: "/etc/yum.conf" - state: absent - when: - - ansible_os_family == 'RedHat' - tags: - - common-proxy - -- name: Remove yum package manager proxy in repo definitions - shell: | - sed -i -e '/proxy = http:\/\/{{ internal_lb_vip_address }}:{{ repo_pkg_cache_port | default('3142') }}/d' /etc/yum.repos.d/* - when: - - ansible_os_family == 'RedHat' - tags: - - common-proxy - -# NOTE(mhayden): If dnf and yum are installed on CentOS, we need to configure -# a proxy for dnf as well. -- name: Remove dnf package manager proxy - lineinfile: - line: >- - proxy="http://{{ internal_lb_vip_address }}:{{ repo_pkg_cache_port | default('3142') }}" - dest: "/etc/dnf/dnf.conf" - state: absent - when: - - ansible_os_family == 'RedHat' - - ansible_pkg_mgr == 'dnf' - tags: - - common-proxy diff --git a/playbooks/containers-lxc-create.yml b/playbooks/containers-lxc-create.yml index 7b57e3f617..ed8b028a35 100644 --- a/playbooks/containers-lxc-create.yml +++ b/playbooks/containers-lxc-create.yml @@ -76,9 +76,6 @@ environment: "{{ deployment_environment_variables | default({}) }}" tags: - lxc-containers-create - pre_tasks: - - include_tasks: common-tasks/package-cache-proxy.yml - when: install_method == "source" roles: - role: "openstack_hosts" is_container: true diff --git a/playbooks/containers-nspawn-create.yml b/playbooks/containers-nspawn-create.yml index efbec0eb5e..6eedea120a 100644 --- a/playbooks/containers-nspawn-create.yml +++ b/playbooks/containers-nspawn-create.yml @@ -114,8 +114,6 @@ setup: gather_subset: "network,hardware,virtual" - - include_tasks: common-tasks/package-cache-proxy.yml - when: install_method == "source" roles: - role: "openstack_hosts" is_container: true diff --git a/playbooks/openstack-hosts-setup.yml b/playbooks/openstack-hosts-setup.yml index ddc22037e9..e057acb1e3 100644 --- a/playbooks/openstack-hosts-setup.yml +++ b/playbooks/openstack-hosts-setup.yml @@ -62,8 +62,6 @@ (ansible_os_family == 'Suse' and ansible_distribution_major_version in ['15', '42']) msg: "The only supported platforms for this release are Debian Stretch or Buster, Ubuntu 18.04 LTS (Bionic), CentOS 7 (WIP) and openSUSE Leap 42.X and openSUSE Leap 15.X" - - include_tasks: common-tasks/package-cache-proxy.yml - when: install_method == "source" roles: - role: "openstack_hosts" vars_files: diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index 1166222d0f..31cbb504e9 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -37,10 +37,6 @@ when: - hostvars['localhost']['resolvconf_enabled'] | bool - - name: Configure package proxy cache - include_tasks: common-tasks/package-cache-proxy.yml - when: install_method == "source" - roles: - role: "os_blazar" - role: "system_crontab_coordination" diff --git a/playbooks/os-congress-install.yml b/playbooks/os-congress-install.yml index eeeb66f4ec..b4b9fed222 100644 --- a/playbooks/os-congress-install.yml +++ b/playbooks/os-congress-install.yml @@ -38,10 +38,6 @@ when: - hostvars['localhost']['resolvconf_enabled'] | bool - - name: Configure package proxy cache - include_tasks: common-tasks/package-cache-proxy.yml - when: install_method == "source" - roles: - role: "os_congress" - role: "system_crontab_coordination" diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index eeaa2c74ff..50317461be 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -37,10 +37,6 @@ when: - hostvars['localhost']['resolvconf_enabled'] | bool - - name: Configure package proxy cache - include_tasks: common-tasks/package-cache-proxy.yml - when: install_method == "source" - roles: - role: "os_mistral" - role: "system_crontab_coordination" diff --git a/playbooks/os-murano-install.yml b/playbooks/os-murano-install.yml index 7929503175..3645fe1412 100644 --- a/playbooks/os-murano-install.yml +++ b/playbooks/os-murano-install.yml @@ -36,10 +36,6 @@ when: - hostvars['localhost']['resolvconf_enabled'] | bool - - name: Configure package proxy cache - include_tasks: common-tasks/package-cache-proxy.yml - when: install_method == "source" - roles: - role: "os_murano" - role: "system_crontab_coordination" diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index 6fb99dbf4d..caba88e25d 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -37,10 +37,6 @@ when: - hostvars['localhost']['resolvconf_enabled'] | bool - - name: Configure package proxy cache - include_tasks: common-tasks/package-cache-proxy.yml - when: install_method == "source" - roles: - role: "os_placement" - role: "system_crontab_coordination"