This module is used to configure a server to act as a apt mirror for externaly managed packages. It also configueres files and folders neccesary to manage an internal repo. The module makes an assumption that repos will be mirrored in three stages(dev, stage and prod). Three vhosts will be created for each of theses domains and a cron job is created to migrate files between the directory structrues such that dev.$mirror\_domain will have files no older then a week, stage will have files aged between one and two weeks and prod will have files between two and three weeks. The following specific actions are preformed
- add /etc/apt/mirror.list which lists all repos that this server will mirror
- add /usr/local/bin/mirror.sh script used to mirror files
- create cron job to run the above script
- create folders needed for repos and link files to the approprite vhost directories
- create files neccessary for signing local repos
- create directory structre for local repo
respos(Hash, Required): A hash of repositories this server will mirrorarchives(Hash, Required): A hash of local repositories to configuermirror_base(Stdlib::Absolutepath, Default: /var/spool/apt-mirror): The path where mirror files will be creatednginx_base(Stdlib::Absolutepath, Default: /usr/share/nginx): The path where nginx web roots existmirror_domain(Stdlib::Host, Default: mirror.dns.icann.org): the domain used for the stages subdomains
Used to define a repository to mirror
uri(Stdlob::HTTPUrl): the uri where the upstream repo existsdistros(Array[String]): an array of dirstros to mirror e.g. trusty, xenialcomponents(Array[String]): An array of components to use e.g. maini386(Boolean): by default we only mirror the deb files set this to true to also mirror deb-i386nginx_name(Optional[String]): by default nginx needs the link to the domain name, however wqhe we have multiple repos under the same domain we can have problems. this parameters is a bit of a hack to ensure a consistent name and is moslty used for ppa.launchpad.net and should be set toppafor respos on that site
used to define a local repository archive
distros(Array[String]): an array of dirstros to mirror e.g. trusty, xenialarchs(Array[String]): An array of architectures to use e.g. amd64components(Array[String]): An array of components to use e.g. maindescription(String): A description of the repo
This module does not manage the web server