arillso.repositories
Ansible Role: repositories
Description
This role manages software repositories on CentOS and Ubuntu systems. By default, it sets up the EPEL repository on CentOS and the Universe repository on Ubuntu.
Installation
Run the following command to install the role:
ansible-galaxy install arillso.repositories
Requirements
No special requirements.
Role Variables
repositories
The repositories
variable is a list of repositories to add, with keys for Ubuntu
or CentOS
.
ubuntu
For Ubuntu, use parameters for the apt
repository module. See: apt_repository.
You need to specify:
Option | Comments |
---|---|
name | The name of the source list |
repo | The repository source string |
centos
For CentOS, use parameters for the yum
repository module and rpm
key. See: yum_repository and rpm_key.
You need to specify:
Option | Comments |
---|---|
name | The name of the base URL |
description | A description for the repository |
baseurl | URL for the directory containing the yum repository's 'repodata' directory |
You can also use metalink
or mirrorlist
instead of baseurl
.
defaults
repositories:
ubuntu:
- name: 'ubuntu universe'
repo: 'deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release | lower }} universe'
- name: 'ubuntu universe'
repo: 'deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release | lower }}-security universe'
- name: 'ubuntu universe'
repo: 'deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release | lower }}-updates universe'
centos:
- name: 'epel'
description: 'EPEL YUM repo'
baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
key: https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
Dependencies
(This section is left blank)
Example Playbook
Here is an example of how to use this role in a playbook:
- hosts: all
roles:
- arillso.repositories
Author
License
This project is licensed under the MIT License. For full license details, see the LICENSE file.
Copyright
(c) 2020, Arillso
Manages Repository under CentOS and Ubuntu
ansible-galaxy install arillso.repositories