Skip to content

This is an ansible series of roles that will allow users to create repository mirrors and share them easily using nginx. This is particularly useful for home labs and make's the output of files in a nice custom path. This also creates local and external .repo files and easy to manage repositories.

Notifications You must be signed in to change notification settings

beaker06/ansible-reposync

Repository files navigation

#This playbook was made by Brandon Eaker in order to make a repository mirror in the simplist way. The user can take this playbook #and make the necessary changes in the repo-vars.yml file. This playbook is ran on the local host that the mirror will be on.

#In the repo-vars.yml start by changing the parent directory that you want the mirror to be stored. The variable names need to #stay the same but the variable itself can be modified.

#Set the share-nginx variable. This will ensure that the NGINX is installed on the system and will share the repositories after #they have been downloaded. If you do not want the repoitory shared over NGINX then set this to NO.

#The repo variables once again need to keep the same variables present but the content will change.

##ARBITRARY DISCRIPTOR (EPEL8)

- id: REPOID (epel-8)

name: REPONAME (epel)

os: OSNAME (epel)

version: VERSION (8)

enable: 1 or 0 (1 = enabled, 0 = disabled)

key: GPGKEY (RPM-GPG-KEY-EPEL-8)

baseurl: BASEURL FOR THE EXTERNAL REPOSITORY (https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/)

#There are tags included in the playbooks so that any part of the playbook can be ran alone for either testing or to make changes.

#This tags are:

- directory

- gpgkeys

- repofiles

- createrepo

- nginx

#To see the specific plays that each tag runs, please "cat reposync.yml"

#To run just the play with specific tags use the command:

ansible-playbook reposync.yml -tags $TAGNAME

#Change $TAGNAME with the appropriate tag (or tags)

#You can implement the ansible-vault or --ask-vault-pass.

#The out of the box script uses the -bkK which is:

-b (--become)

-k (--ask-pass)

-K (--ask-become-pass)

-vv (adds 2 levels of verbosity)

#For additional information about cli command usage please see:

About

This is an ansible series of roles that will allow users to create repository mirrors and share them easily using nginx. This is particularly useful for home labs and make's the output of files in a nice custom path. This also creates local and external .repo files and easy to manage repositories.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published