Bring in a bit of Ubuntu support from Nadir.
This commit is contained in:
parent
7613ddde67
commit
e2f80db7b7
8 changed files with 44 additions and 14 deletions
2
README
2
README
|
@ -15,6 +15,8 @@ sources.list and apt_preferences are managed. More recent Debian
|
||||||
releases are pinned to very low values by default to prevent
|
releases are pinned to very low values by default to prevent
|
||||||
accidental upgrades.
|
accidental upgrades.
|
||||||
|
|
||||||
|
Ubuntu support is lagging behind but not absent either.
|
||||||
|
|
||||||
This module needs lsb-release installed.
|
This module needs lsb-release installed.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
class apt::default_preferences {
|
class apt::default_preferences {
|
||||||
config_file {
|
case $operatingsystem {
|
||||||
# this just pins unstable and testing to very low values
|
'debian': {
|
||||||
"/etc/apt/preferences":
|
config_file {
|
||||||
content => template("apt/preferences_${codename}.erb"),
|
"/etc/apt/preferences":
|
||||||
# use File[apt_config] to reference a completed configuration
|
content => template("apt/${operatingsystem}/preferences_${codename}.erb"),
|
||||||
# See "The Puppet Semaphor" 2007-06-25 on the puppet-users ML
|
# use File[apt_config] to reference a completed configuration
|
||||||
alias => apt_config,
|
# See "The Puppet Semaphor" 2007-06-25 on the puppet-users ML
|
||||||
# only update together
|
alias => apt_config,
|
||||||
require => File["/etc/apt/sources.list"];
|
# only update together
|
||||||
# little default settings which keep the system sane
|
require => File["/etc/apt/sources.list"];
|
||||||
"/etc/apt/apt.conf.d/from_puppet":
|
# little default settings which keep the system sane
|
||||||
content => "APT::Get::Show-Upgraded true;\nDSelect::Clean $real_apt_clean;\n",
|
"/etc/apt/apt.conf.d/from_puppet":
|
||||||
before => Config_file[apt_config];
|
content => "APT::Get::Show-Upgraded true;\nDSelect::Clean $real_apt_clean;\n",
|
||||||
|
before => Config_file[apt_config];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'ubuntu': {
|
||||||
|
notice('There is no support for default Ubuntu APT preferences')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ class apt::default_sources_list {
|
||||||
# include main, security and backports
|
# include main, security and backports
|
||||||
# additional sources could be included via an array
|
# additional sources could be included via an array
|
||||||
"/etc/apt/sources.list":
|
"/etc/apt/sources.list":
|
||||||
content => template("apt/sources.list.erb"),
|
content => template("apt/${operatingsystem}/sources.list.erb"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
22
templates/Ubuntu/sources.list.erb
Normal file
22
templates/Ubuntu/sources.list.erb
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# This file is brought to you by puppet
|
||||||
|
|
||||||
|
# basic <%= lsbdistcodename %>
|
||||||
|
deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> main restricted universe multiverse
|
||||||
|
<% if include_src then -%>
|
||||||
|
deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> main restricted universe multiverse
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
# updates
|
||||||
|
deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates main restricted universe multiverse
|
||||||
|
<% if include_src then -%>
|
||||||
|
deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates main restricted universe multiverse
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
# security suppport
|
||||||
|
deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security main restricted universe multiverse
|
||||||
|
<% if include_src then -%>
|
||||||
|
deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security main restricted universe multiverse
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
# backports
|
||||||
|
deb http://archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-backports main universe multiverse restricted
|
Loading…
Reference in a new issue