Travis Truman f223f9b180 Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: I6a27bfbd0fc9bbcd341d602bab074b0ea1bdbbca
2016-08-26 14:35:50 -04:00

76 lines
2.0 KiB
YAML

---
# Copyright 2016, 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: Install repo caching server packages (yum)
yum:
pkg: "{{ item }}"
state: "{{ repo_server_package_state }}"
enablerepo: "epel-testing"
register: install_packages
until: install_packages|success
retries: 5
delay: 5
with_items: "{{ repo_pkg_cache_server_distro_packages }}"
when:
- ansible_pkg_mgr == 'yum'
- repo_pkg_cache_enabled | bool
- name: Install repo caching server packages (apt)
apt:
pkg: "{{ item }}"
state: "{{ repo_server_package_state }}"
register: install_packages
until: install_packages|success
retries: 5
delay: 5
with_items: "{{ repo_pkg_cache_server_distro_packages }}"
when:
- ansible_pkg_mgr == 'apt'
- repo_pkg_cache_enabled | bool
- name: Create cache directory
file:
path: "{{ repo_service_home_folder }}/repo/pkg-cache"
state: "directory"
owner: "apt-cacher-ng"
group: "{{ repo_service_group_name }}"
mode: "02775"
- name: Stat the cache path
stat:
path: /var/cache/apt-cacher-ng
register: acs
- name: Remove cacher directory if its a directory
file:
path: "/var/cache/apt-cacher-ng"
state: "absent"
when:
- acs.stat.isdir is defined and acs.stat.isdir
- name: Link cacher to the repo path
file:
src: "{{ repo_service_home_folder }}/repo/pkg-cache"
dest: "/var/cache/apt-cacher-ng"
state: "link"
- name: Drop acng.conf
template:
src: "acng.conf.j2"
dest: "/etc/apt-cacher-ng/acng.conf"
notify:
- reload acng