47 lines
1 KiB
Puppet
47 lines
1 KiB
Puppet
|
|
# Mirroring tool for apt repositories
|
|
#
|
|
# === Global variables
|
|
#
|
|
# $aptmirror_threads:
|
|
# Number of download threads to use, defaults to 5.
|
|
#
|
|
# $aptmirror_server:
|
|
# Server to use for mirroring, defaults to
|
|
# http://archive.ubuntu.com/ubuntu
|
|
#
|
|
# $aptmirror_list:
|
|
# List of Ubuntu versions to mirror, defaults to [ "lucid" ].
|
|
#
|
|
class apt::mirror {
|
|
|
|
if ! $aptmirror_threads {
|
|
$aptmirror_threads = 10
|
|
}
|
|
|
|
if ! $aptmirror_server {
|
|
$aptmirror_server = "http://archive.ubuntu.com/ubuntu"
|
|
}
|
|
|
|
if ! $aptmirror_list {
|
|
$aptmirror_list = [ "lucid" ]
|
|
}
|
|
|
|
package { "apt-mirror":
|
|
ensure => installed,
|
|
}
|
|
|
|
file { "/etc/apt/miror.list":
|
|
ensure => present,
|
|
name => $operatingsystem ? {
|
|
centos => "/etc/apt-mirror.list",
|
|
default => "/etc/apt/miror.list",
|
|
},
|
|
contents => template("apt/mirror.list.erb"),
|
|
mode => 0644,
|
|
owner => root,
|
|
group => root,
|
|
require => Package["apt-mirror"],
|
|
}
|
|
|
|
}
|