Mirror of Puppet's APT repo
Перейти к файлу
Tim Sharpe ea4bf9b162 Merge pull request #2 from github/url_param
Add url param to aptmirror::source
2013-06-26 22:01:30 -07:00
manifests Merge pull request #2 from github/url_param 2013-06-26 22:01:30 -07:00
spec Add url param to aptmirror::source 2013-06-27 14:59:17 +10:00
templates/etc/apt Add url param to aptmirror::source 2013-06-27 14:59:17 +10:00
vendor/cache Specs for aptmirror::source 2013-03-26 19:24:23 -04:00
.gitignore Specs for aptmirror::source 2013-03-26 19:24:23 -04:00
Gemfile Specs for aptmirror::source 2013-03-26 19:24:23 -04:00
Gemfile.lock Specs for aptmirror::source 2013-03-26 19:24:23 -04:00
README.md Document the aptmirror class params 2013-03-26 18:57:25 -04:00
Rakefile Specs for aptmirror::source 2013-03-26 19:24:23 -04:00

README.md

puppet-aptmirror

Usage

class { 'aptmirror': }

aptmirror::source { 'http://us.archive.ubuntu.com':
  amd64         => true,
  clean         => true,
  source        => true,
  distributions => [
    'precise',
    'precise-updates',
    'precise-security',
    'precise-backports',
  ],
  components    => [
    'main',
    'restricted',
    'universe',
    'multiverse',
  ],
}

Classes

aptmirror

  • base_path - The base path on disk where apt-mirror will store its data. Defaults to /var/spool/apt-mirror.
  • mirror_path - The path on disk where the packages will be stored. Defaults to $base_path/mirror.
  • skel_path - The path on disk where the downloaded indexes will be temporarily stored. Defaults to $base_path/skel.
  • var_path - The path on disk where the log files and MD5 sums will be stored. Defaults to $base_path/var.
  • cleanscript - The path to the mirror cleaning script. Defaults to $var_path/clean.sh.
  • postmirror_script - The path to the script that will run after the mirror process has finished. Defaults to $var_path/postmirror.sh.
  • defaultarch - The architecture to pull down if you don't specify an architecture in your aptmirror::sources. Defaults to amd64.
  • run_postmirror - Set to 1 to run the postmirror script after the mirror has finished syncing. Defaults to 0.
  • nthreads - The number of threads apt-mirror should run. Defaults to 20.
  • _tilde - Set to 1 to skip packages that contain a tilde (~). Defaults to 0.

Defined Types

aptmirror::source

  • namevar - The URL of the repository to mirror.
  • distributions - An array of apt repository distributions to mirror.
  • components - An array of apt repository components to mirror.
  • clean - Set to true to enable cleaning of old packages from this source from the mirror. Defaults to false.
  • amd64 - Set to true to enable mirroring of the amd64 packages. Defaults to false.
  • i386 - Set to true to enable mirroring of the i386 packages. Defaults to false.
  • source - Set to true to enable mirroring of the dpkg source files. Defaults to false.

Here Be Dragons

This module works through some interesting catalogue hackery. The aptmirror::source defined type doesn't actually do anything, it just acts as way to store data about the sources in your Puppet catalogue. In the /etc/apt/mirror.list template, we inspect the catalogue, pull out all the aptmirror::source instances and use their values to populate the template. This is done so that you can specify aptmirror::source dynamically anywhere in your manifests without having to go back and modify a static list of sources in the aptmirror class definition.