openstack-ansible-repo_server/tasks/repo_sync_manager.yml
Jesse Pretorius 6663637374 Remove apt-cacher-ng
The repo container's package cache causes quite a bit of confusion
given that it's a 'hidden' feature which catches deployers off-guard
when they already have their own cache configured. This is really
the kind of service which people should manage outside of OSA. It
also makes no sense if the deployer is using their own local mirror
which is a fairly common practise. Adding to that, it seems that it
is broken in bionic, causing massive delays in package installs.
Finally, it also adds to quite a bit of complexity due to the fact
that it's in a container - so in the playbooks prior to the container's
existence we have to detect whether it's there and add/remove the config
accordingly.

Let's just remove it and let deployers managing their own caching
infrastructure if they want it.

Change-Id: I829b9cfa16fbd1f9f4d33b5943f1e46623e1b157
2018-10-08 14:48:32 +01:00

49 lines
1.5 KiB
YAML

---
# Copyright 2014, Rackspace US, Inc.
#
# 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.
- name: Deploy lsyncd configuration file
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- { src: "lsyncd.lua.j2", dest: "{{ repo_lsyncd_config_file }}" }
- { src: "lsyncd.defaults.j2", dest: "{{ repo_lsyncd_defaults_file }}" }
notify:
- reload lsyncd
- cleanup apt-cacher-ng service
when:
- groups['repo_all'] | length > 1
tags:
- repo-lsyncd
- repo-config
# TODO(odyssey4me):
# Remove this task in T. It is only present for the
# Q->R upgrade or for R->S upgrades for environments which
# were installed prior to R's release.
# It is implemented as a handler to prevent the service
# being removed before lsync has restarted with the new
# config. This task in particular cater for when lsync
# is not used because there is only one repo container.
- name: Remove apt-cacher-ng service
command: "true"
when:
- groups['repo_all'] | length == 1
notify:
- cleanup apt-cacher-ng service
tags:
- skip_ansible_lint