ed625067b3
Removes references to the now-deprecated package cache repo from yum.conf and the Percona repo in yum.repos.d Change-Id: I19248324604e079336c896b763a0b97ec6aad3a2 Closes-Bug: #1849219
76 lines
2.2 KiB
YAML
76 lines
2.2 KiB
YAML
---
|
|
# Copyright 2016, Logan Vig <logan2211@gmail.com>
|
|
#
|
|
# 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
|