Added support for deploying APT sources.list
This commit is contained in:
parent
44808208b4
commit
492044ea42
2 changed files with 86 additions and 0 deletions
|
@ -16,6 +16,40 @@ class apt {
|
|||
}
|
||||
|
||||
|
||||
# Configure /etc/apt/sources.list
|
||||
#
|
||||
# === Global variables
|
||||
#
|
||||
# $apt_archive_url:
|
||||
# Base URL of archive repository. Defaults to http://archive.ubuntu.com/ubuntu/.
|
||||
# $apt_security_url:
|
||||
# Base URL of security repository. Defaults to http://security.ubuntu.com/ubuntu/.
|
||||
#
|
||||
class apt::sources {
|
||||
|
||||
tag("bootstrap")
|
||||
|
||||
include apt
|
||||
|
||||
if !$apt_archive_url {
|
||||
$apt_archive_url = "http://archive.ubuntu.com/ubuntu/"
|
||||
}
|
||||
if !$apt_security_url {
|
||||
$apt_security_url = "http://security.ubuntu.com/ubuntu/"
|
||||
}
|
||||
|
||||
file { "/etc/apt/sources.list":
|
||||
ensure => present,
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
group => root,
|
||||
content => template("apt/sources.list.erb"),
|
||||
notify => Exec["apt-get-update"],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install apt-cacher server
|
||||
#
|
||||
class apt::cacher {
|
||||
|
|
52
apt/templates/sources.list.erb
Normal file
52
apt/templates/sources.list.erb
Normal file
|
@ -0,0 +1,52 @@
|
|||
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
|
||||
# newer versions of the distribution.
|
||||
|
||||
deb <%= apt_archive_url %> <%= lsbdistcodename %> main restricted
|
||||
deb-src <%= apt_archive_url %> <%= lsbdistcodename %> main restricted
|
||||
|
||||
## Major bug fix updates produced after the final release of the
|
||||
## distribution.
|
||||
deb <%= apt_archive_url %> <%= lsbdistcodename %>-updates main restricted
|
||||
deb-src <%= apt_archive_url %> <%= lsbdistcodename %>-updates main restricted
|
||||
|
||||
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
||||
## team. Also, please note that software in universe WILL NOT receive any
|
||||
## review or updates from the Ubuntu security team.
|
||||
deb <%= apt_archive_url %> <%= lsbdistcodename %> universe
|
||||
deb-src <%= apt_archive_url %> <%= lsbdistcodename %> universe
|
||||
deb <%= apt_archive_url %> <%= lsbdistcodename %>-updates universe
|
||||
deb-src <%= apt_archive_url %> <%= lsbdistcodename %>-updates universe
|
||||
|
||||
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
||||
## team, and may not be under a free licence. Please satisfy yourself as to
|
||||
## your rights to use the software. Also, please note that software in
|
||||
## multiverse WILL NOT receive any review or updates from the Ubuntu
|
||||
## security team.
|
||||
deb <%= apt_archive_url %> <%= lsbdistcodename %> multiverse
|
||||
deb-src <%= apt_archive_url %> <%= lsbdistcodename %> multiverse
|
||||
deb <%= apt_archive_url %> <%= lsbdistcodename %>-updates multiverse
|
||||
deb-src <%= apt_archive_url %> <%= lsbdistcodename %>-updates multiverse
|
||||
|
||||
## Uncomment the following two lines to add software from the 'backports'
|
||||
## repository.
|
||||
## N.B. software from this repository may not have been tested as
|
||||
## extensively as that contained in the main release, although it includes
|
||||
## newer versions of some applications which may provide useful features.
|
||||
## Also, please note that software in backports WILL NOT receive any review
|
||||
## or updates from the Ubuntu security team.
|
||||
# deb <%= apt_archive_url %> <%= lsbdistcodename %>-backports main restricted universe multiverse
|
||||
# deb-src <%= apt_archive_url %> <%= lsbdistcodename %>-backports main restricted universe multiverse
|
||||
|
||||
## Uncomment the following two lines to add software from Canonical's
|
||||
## 'partner' repository.
|
||||
## This software is not part of Ubuntu, but is offered by Canonical and the
|
||||
## respective vendors as a service to Ubuntu users.
|
||||
# deb http://archive.canonical.com/ubuntu <%= lsbdistcodename %> partner
|
||||
# deb-src http://archive.canonical.com/ubuntu <%= lsbdistcodename %> partner
|
||||
|
||||
deb <%= apt_security_url %> <%= lsbdistcodename %>-security main restricted
|
||||
deb-src <%= apt_security_url %> <%= lsbdistcodename %>-security main restricted
|
||||
deb <%= apt_security_url %> <%= lsbdistcodename %>-security universe
|
||||
deb-src <%= apt_security_url %> <%= lsbdistcodename %>-security universe
|
||||
deb <%= apt_security_url %> <%= lsbdistcodename %>-security multiverse
|
||||
deb-src <%= apt_security_url %> <%= lsbdistcodename %>-security multiverse
|
Loading…
Add table
Reference in a new issue