Paul Belanger 8638ac3e2a
Create configure-mirrors role
This will be used to replace our current confgure_mirror.sh script
that we today as a ready-script in nodepool.

This only adds support for ubuntu today. As we move forward and
configuration openstack-infra from JJB to ansible, we'll need to add
more distros.

Attach the role to the unittests base job for now. It should ultimately
be attached to the base job, but adding it to the unittests job lets us
test it more easily.

Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Change-Id: I9bfa28c87390c09bb2c4cd0de6ce4c7890f8d81a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-11 14:56:12 -04:00

28 lines
678 B
YAML

- name: Include OS-specific variables
include_vars: "{{ ansible_distribution | lower }}.yaml"
- name: Install /etc/pip.conf configuration
become: yes
template:
dest: /etc/pip.conf
group: root
mode: 0644
owner: root
src: etc/pip.conf.j2
- name: Install .pydistutils.cfg configuration in homedir
template:
dest: ~/.pydistutils.cfg
mode: 0644
src: .pydistutils.cfg.j2
- name: Setup distro specific packaging mirrors.
include: "packages/{{ ansible_distribution | lower }}.yaml"
# Make sure OS does not have a stale package cache.
- name: Update apt cache
become: yes
apt:
update_cache: yes
when: ansible_os_family == 'Debian'