https://github.com/devgateway/ansible-role-package-manager-mirror
Configure a mirror of standard repositories for APT, YUM, and DNF
https://github.com/devgateway/ansible-role-package-manager-mirror
ansible ansible-role apt dnf package-manager repo repository yum
Last synced: about 1 month ago
JSON representation
Configure a mirror of standard repositories for APT, YUM, and DNF
- Host: GitHub
- URL: https://github.com/devgateway/ansible-role-package-manager-mirror
- Owner: devgateway
- Created: 2017-12-29T22:19:53.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-23T19:16:18.000Z (about 6 years ago)
- Last Synced: 2025-07-23T13:00:04.647Z (10 months ago)
- Topics: ansible, ansible-role, apt, dnf, package-manager, repo, repository, yum
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Package Manager Mirror
Configure a mirror of standard repositories for APT, YUM, and DNF. Useful if you have a caching proxy and want to ensure cache hits.
Role Variables
--------------
### `pkgmgr_proxy`
If defined, the role will configure the package manager to use this URL as a proxy.
### `pkgmgr_mirror`
A dictionary of repository settings with distribution names as keys. Values are different for different distributions.
#### Debian-like
Values are dictionaries in which either *default* key or the specific release name key must be present. The release name is taken from Ansible fact `ansible_lsb.codename`, and defaults to `ansible_distribution_release` if it's not set (varies by release).
Values are dictionaries where *url* member is the base URL (one level **above** subdirectories like *dists* and *pool*, see example below), and *components* member is a list of distribution components, such as *main*, *contrib*, or *non-free*.
#### RH-like
Values are base URLs (see example below). They should be one level **above** the following subdirectories:
* major release numbers in CentOS and Scientific
* *releases* in Fedora
Example Playbook
----------------
---
- hosts: all
roles:
- role: package-manager-mirror
pkgmgr_proxy: http://proxy.example.net:3128
pkgmgr_mirror:
Debian:
default:
url: http://ftp.us.debian.org/debian/
components:
- main
- contrib
sid:
components:
- main
- non-free
- contrib
CentOS:
default: http://mirror.centos.org/centos
Scientific:
default: http://ftp.scientificlinux.org/linux/scientific
Fedora:
default: http://download.fedoraproject.org/pub/fedora/linux
v24: http://archives.fedoraproject.org/pub/archive/fedora/linux
License
-------
GPLv3+
Author Information
------------------
Copyright 2018, Development Gateway