Centos repository management
- Install a list of packages ( usually repos package )
- Ensure a list of repos are not present
- Ensure list of repos keys is imported
- Any number of repos with any configuration
Define the Configuration hash some place . Check Examples at defaults/main.yml.ex
repos:
key_list: [] # Optional: list of repository keys to import
# - "http://packages.elastic.co/GPG-KEY-elasticsearch"
package_list: [] # Optional list of packages to install .
# # optionally with version (default to latest )
# - { name: "bind-utils", state: "latest" }
names_to_remove: # Optional - List of repos definition to remove
- repo2.repo
- repo3.repo
add: # Also optional - list of repos to create
- name: repo1
content: |
[custom_repo]
name=Ansible repo build by ansible
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
tests: # optional . lists of shell tests
- {
name: test1,
command: "echo 'test1 succeed' "
}
- {
name: test2,
command: "echo 'test2 succeed' "
}
- Centos
- Debian
GNU GPLv3
Created by Miguel Rodrigues