summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2011-04-23 10:50:53 -0400
committerMicah Anderson <micah@riseup.net>2011-04-23 10:50:53 -0400
commit11324d6057b78814ed54d4b69da38af3304e1c70 (patch)
tree858ba34a68ae2ae6557d0ca933225520ef1ed97e
parent9354f09460aba2eb22ad8fd0464729a5ef9b216d (diff)
parent5964e90e335473844f2474efe6590c0218a8e7f2 (diff)
Merge remote-tracking branch 'nadir/master'
-rw-r--r--manifests/custom_sources.pp10
-rw-r--r--manifests/init.pp2
-rw-r--r--manifests/preferences.pp2
-rw-r--r--manifests/unattended_upgrades.pp4
-rw-r--r--templates/Ubuntu/preferences_maverick.erb29
5 files changed, 45 insertions, 2 deletions
diff --git a/manifests/custom_sources.pp b/manifests/custom_sources.pp
new file mode 100644
index 0000000..d0c020a
--- /dev/null
+++ b/manifests/custom_sources.pp
@@ -0,0 +1,10 @@
+define apt::custom_sources_template ($sources_file = "") {
+
+ include apt::update
+
+ file { "/etc/apt/sources.list.d/$sources_file":
+ content => template($name),
+ notify => Exec['apt_updated']
+ }
+}
+
diff --git a/manifests/init.pp b/manifests/init.pp
index b5be91f..57f02e9 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -5,6 +5,8 @@
class apt {
+ import "custom_sources.pp"
+
$use_volatile = $apt_volatile_enabled ? {
'' => false,
default => $apt_volatile_enabled,
diff --git a/manifests/preferences.pp b/manifests/preferences.pp
index 4c93542..71ef0a6 100644
--- a/manifests/preferences.pp
+++ b/manifests/preferences.pp
@@ -7,7 +7,7 @@ class apt::preferences {
content => $custom_preferences ? {
'' => $operatingsystem ? {
'debian' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
- 'ubuntu' => '',
+ 'ubuntu' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
},
default => $custom_preferences
},
diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp
index e2992f8..b90fcbb 100644
--- a/manifests/unattended_upgrades.pp
+++ b/manifests/unattended_upgrades.pp
@@ -6,7 +6,9 @@ class apt::unattended_upgrades {
}
apt_conf { "50unattended-upgrades":
- source => ["puppet:///modules/site-apt/50unattended-upgrades",
+ source => ["puppet:///modules/site-apt/$lsbdistcodename/50unattended-upgrades",
+ "puppet:///modules/site-apt/50unattended-upgrades",
+ "puppet:///modules/apt/$lsbdistcodename/50unattended-upgrades",
"puppet:///modules/apt/50unattended-upgrades" ],
require => Package['unattended-upgrades'],
}
diff --git a/templates/Ubuntu/preferences_maverick.erb b/templates/Ubuntu/preferences_maverick.erb
new file mode 100644
index 0000000..00ca4c4
--- /dev/null
+++ b/templates/Ubuntu/preferences_maverick.erb
@@ -0,0 +1,29 @@
+Explanation: Ubuntu <%= codename %> security
+Package: *
+Pin: release o=Ubuntu,a=<%= codename %>-security
+Pin-Priority: 990
+
+Explanation: Ubuntu <%= codename %> updates
+Package: *
+Pin: release o=Ubuntu,a=<%= codename %>-updates
+Pin-Priority: 980
+
+Explanation: Ubuntu <%= codename %>
+Package: *
+Pin: release o=Ubuntu,a=<%= codename %>
+Pin-Priority: 970
+
+Explanation: Ubuntu backports
+Package: *
+Pin: release a=<%= codename %>-backports
+Pin-Priority: 200
+
+Explanation: Ubuntu <%= next_release %>
+Package: *
+Pin: release o=Ubuntu,a=<%= next_release %>
+Pin-Priority: 2
+
+Explanation: Ubuntu fallback
+Package: *
+Pin: release o=Ubuntu
+Pin-Priority: -10