aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-31 14:50:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-31 14:50:07 -0300
commitb65996f7ae03d2bae118855a3c4d94a3947e556d (patch)
tree5bab8e5c3663aaabca34ebcee3c706c4fbc35cb5 /templates
parentb0425c65ecc61c6af3f31fba577b1e1c5d880674 (diff)
parent8c8bd7bb1e5cc0f5297db9629ece783452233d1f (diff)
downloadpuppet-apt-b65996f7ae03d2bae118855a3c4d94a3947e556d.tar.gz
puppet-apt-b65996f7ae03d2bae118855a3c4d94a3947e556d.tar.bz2
Merge remote-tracking branch 'shared/master' into developHEADmasterdevelop
Conflicts: README files/Debian/50unattended-upgrades.lenny files/Debian/50unattended-upgrades.wheezy manifests/init.pp manifests/params.pp manifests/unattended_upgrades.pp templates/Debian/preferences_jessie.erb templates/Debian/sources.list.erb
Diffstat (limited to 'templates')
-rw-r--r--templates/20proxy.erb2
-rw-r--r--templates/50unattended-upgrades.erb38
l---------templates/Debian/apticron_jessie.erb1
-rw-r--r--templates/Debian/apticron_lenny.erb18
-rw-r--r--templates/Debian/apticron_squeeze.erb18
-rw-r--r--templates/Debian/apticron_wheezy.erb18
l---------templates/Debian/listchanges_jessie.erb1
-rw-r--r--templates/Debian/preferences_jessie.erb8
-rw-r--r--templates/Debian/preferences_lenny.erb6
-rw-r--r--templates/Debian/preferences_squeeze.erb9
-rw-r--r--templates/Debian/preferences_wheezy.erb2
-rw-r--r--templates/Debian/sources.list.erb84
-rw-r--r--templates/Ubuntu/preferences_maverick.erb4
l---------templates/Ubuntu/preferences_utopic.erb1
l---------templates/Ubuntu/preferences_vivid.erb1
l---------templates/Ubuntu/preferences_wily.erb1
l---------templates/Ubuntu/preferences_xenial.erb1
-rw-r--r--templates/Ubuntu/sources.list.erb14
-rw-r--r--templates/preferences_snippet.erb6
-rw-r--r--templates/preferences_snippet_release.erb6
20 files changed, 133 insertions, 106 deletions
diff --git a/templates/20proxy.erb b/templates/20proxy.erb
index ea706b6..520e7b1 100644
--- a/templates/20proxy.erb
+++ b/templates/20proxy.erb
@@ -1,5 +1,5 @@
// This file is managed by Puppet
// all local modifications will be overwritten
-Acquire::http { Proxy "<%= proxy %>:<%= port %>"; };
+Acquire::http { Proxy "<%= @proxy %>:<%= @port %>"; };
Acquire::HTTP::Proxy::bugs.debian.org "DIRECT";
diff --git a/templates/50unattended-upgrades.erb b/templates/50unattended-upgrades.erb
new file mode 100644
index 0000000..7c65d10
--- /dev/null
+++ b/templates/50unattended-upgrades.erb
@@ -0,0 +1,38 @@
+// this file is managed by puppet !
+
+<% if scope.lookupvar('::operatingsystem') == 'Ubuntu' -%>
+Unattended-Upgrade::Allowed-Origins {
+ "${distro_id}:${distro_codename}-security";
+ "${distro_id}:${distro_codename}-updates";
+ "${distro_id}:${distro_codename}-backports";
+<% elsif scope.lookupvar('::operatingsystem') == 'Debian' and scope.lookupvar('::debian_codename') == 'squeeze' -%>
+Unattended-Upgrade::Allowed-Origins {
+ "${distro_id}:<%= scope.lookupvar('::debian_release') %>";
+ "${distro_id}:squeeze-lts";
+<% elsif scope.lookupvar('::operatingsystem') == 'Debian' and scope.lookupvar('::debian_codename') == 'wheezy' -%>
+Unattended-Upgrade::Origins-Pattern {
+ "origin=Debian,archive=<%= scope.lookupvar('::debian_release') %>,label=Debian-Security";
+ "origin=Debian,archive=${distro_codename}-lts";
+<% else -%>
+Unattended-Upgrade::Origins-Pattern {
+ "origin=Debian,codename=${distro_codename},label=Debian";
+ "origin=Debian,codename=${distro_codename},label=Debian-Security";
+<% end -%>
+};
+
+<% if not @blacklisted_packages.empty? -%>
+Unattended-Upgrade::Package-Blacklist {
+<% @blacklisted_packages.each do |pkg| -%>
+ "<%= pkg %>";
+<% end -%>
+};
+<% end -%>
+
+APT::Periodic::Update-Package-Lists "1";
+APT::Periodic::Download-Upgradeable-Packages "1";
+APT::Periodic::Unattended-Upgrade "1";
+
+Unattended-Upgrade::Mail "<%= @mail_recipient -%>";
+<% if @mailonlyonerror -%>
+Unattended-Upgrade::MailOnlyOnError "true";
+<% end -%>
diff --git a/templates/Debian/apticron_jessie.erb b/templates/Debian/apticron_jessie.erb
new file mode 120000
index 0000000..a9a3a6f
--- /dev/null
+++ b/templates/Debian/apticron_jessie.erb
@@ -0,0 +1 @@
+apticron_wheezy.erb \ No newline at end of file
diff --git a/templates/Debian/apticron_lenny.erb b/templates/Debian/apticron_lenny.erb
index aad9985..86b0997 100644
--- a/templates/Debian/apticron_lenny.erb
+++ b/templates/Debian/apticron_lenny.erb
@@ -24,9 +24,9 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# of "hostname -f" for the system name in the mails it generates
#
# SYSTEM="foobar.example.com"
-<%- unless scope.lookupvar('apt::apticron::system').to_s == "false" -%>
-<%= "SYSTEM=\"#{scope.lookupvar('apt::apticron::system')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::system')).to_s == "false" -%>
+SYSTEM="<%= v %>"
+<% end -%>
#
# Set IPADDRESSNUM if you would like to configure the maximal number of IP
@@ -34,9 +34,9 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# family type (inet, inet6), if available.
#
# IPADDRESSNUM="1"
-<%- unless scope.lookupvar('apt::apticron::ipaddressnum').to_s == "false" -%>
-<%= "IPADDRESSNUM=\"#{scope.lookupvar('apt::apticron::ipaddressnum')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::ipaddressnum')).to_s == "false" -%>
+IPADDRESSNUM="<%= v %>"
+<% end -%>
#
# Set IPADDRESSES to a whitespace seperated list of reachable addresses for
@@ -44,7 +44,7 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# "ip" command
#
# IPADDRESSES="192.0.2.1 2001:db8:1:2:3::1"
-<%- unless scope.lookupvar('apt::apticron::ipaddresses').to_s == "false" -%>
-<%= "IPADDRESSES=\"#{scope.lookupvar('apt::apticron::ipaddresses')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::ipaddresses')).to_s == "false" -%>
+IPADDRESSES="<%= v %>"
+<% end -%>
diff --git a/templates/Debian/apticron_squeeze.erb b/templates/Debian/apticron_squeeze.erb
index 580179e..05b7c9b 100644
--- a/templates/Debian/apticron_squeeze.erb
+++ b/templates/Debian/apticron_squeeze.erb
@@ -26,9 +26,9 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# of "hostname -f" for the system name in the mails it generates
#
# SYSTEM="foobar.example.com"
-<%- unless scope.lookupvar('apt::apticron::system').to_s == "false" -%>
-<%= "SYSTEM=\"#{scope.lookupvar('apt::apticron::system')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::system')).to_s == "false" -%>
+SYSTEM="<%= v %>"
+<% end -%>
#
@@ -37,9 +37,9 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# family type (inet, inet6), if available.
#
# IPADDRESSNUM="1"
-<%- unless scope.lookupvar('apt::apticron::ipaddressnum').to_s == "false" -%>
-<%= "IPADDRESSNUM=\"#{scope.lookupvar('apt::apticron::ipaddressnum')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::ipaddressnum')).to_s == "false" -%>
+IPADDRESSNUM="<%= v %>"
+<% end -%>
#
@@ -48,9 +48,9 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# "ip" command
#
# IPADDRESSES="192.0.2.1 2001:db8:1:2:3::1"
-<%- unless scope.lookupvar('apt::apticron::ipaddresses').to_s == "false" -%>
-<%= "IPADDRESSES=\"#{scope.lookupvar('apt::apticron::ipaddresses')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::ipaddresses')).to_s == "false" -%>
+IPADDRESSES="<%= v %>"
+<% end -%>
#
diff --git a/templates/Debian/apticron_wheezy.erb b/templates/Debian/apticron_wheezy.erb
index d8c8804..655854e 100644
--- a/templates/Debian/apticron_wheezy.erb
+++ b/templates/Debian/apticron_wheezy.erb
@@ -25,9 +25,9 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# of "hostname -f" for the system name in the mails it generates
#
# SYSTEM="foobar.example.com"
-<%- unless scope.lookupvar('apt::apticron::system').to_s == "false" -%>
-<%= "SYSTEM=\"#{scope.lookupvar('apt::apticron::system')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::system')).to_s == "false" -%>
+SYSTEM="<%= v %>"
+<% end -%>
#
# Set IPADDRESSNUM if you would like to configure the maximal number of IP
@@ -35,9 +35,9 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# family type (inet, inet6), if available.
#
# IPADDRESSNUM="1"
-<%- unless scope.lookupvar('apt::apticron::ipaddressnum').to_s == "false" -%>
-<%= "IPADDRESSNUM=\"#{scope.lookupvar('apt::apticron::ipaddressnum')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::ipaddressnum')).to_s == "false" -%>
+IPADDRESSNUM="<%= v %>"
+<% end -%>
#
# Set IPADDRESSES to a whitespace separated list of reachable addresses for
@@ -45,9 +45,9 @@ LISTCHANGES_PROFILE="<%= scope.lookupvar('apt::apticron::listchanges_profile') %
# "ip" command
#
# IPADDRESSES="192.0.2.1 2001:db8:1:2:3::1"
-<%- unless scope.lookupvar('apt::apticron::ipaddresses').to_s == "false" -%>
-<%= "IPADDRESSES=\"#{scope.lookupvar('apt::apticron::ipaddresses')}\"" %>
-<%- end -%>
+<% unless (v=scope.lookupvar('apt::apticron::ipaddresses')).to_s == "false" -%>
+IPADDRESSES=<%= v %>"
+<% end -%>
#
# Set NOTIFY_HOLDS="0" if you don't want to be notified about new versions of
diff --git a/templates/Debian/listchanges_jessie.erb b/templates/Debian/listchanges_jessie.erb
new file mode 120000
index 0000000..74ab496
--- /dev/null
+++ b/templates/Debian/listchanges_jessie.erb
@@ -0,0 +1 @@
+listchanges_lenny.erb \ No newline at end of file
diff --git a/templates/Debian/preferences_jessie.erb b/templates/Debian/preferences_jessie.erb
index 0cc0e5c..0888abe 100644
--- a/templates/Debian/preferences_jessie.erb
+++ b/templates/Debian/preferences_jessie.erb
@@ -1,13 +1,8 @@
-Explanation: Debian <%= codename=scope.lookupvar('apt::codename') %>
+Explanation: Debian <%= codename=scope.lookupvar('::debian_codename') %>
Package: *
Pin: release o=Debian,n=<%= codename %>
Pin-Priority: 990
-Explanation: Debian <%= codename %>-updates
-Package: *
-Pin: release o=Debian,n=<%= codename %>-updates
-Pin-Priority: 990
-
Explanation: Debian sid
Package: *
Pin: release o=Debian,n=sid
@@ -17,4 +12,3 @@ Explanation: Debian fallback
Package: *
Pin: release o=Debian
Pin-Priority: -10
-
diff --git a/templates/Debian/preferences_lenny.erb b/templates/Debian/preferences_lenny.erb
index 5c3c829..6500168 100644
--- a/templates/Debian/preferences_lenny.erb
+++ b/templates/Debian/preferences_lenny.erb
@@ -1,6 +1,6 @@
-Explanation: Debian <%= codename=scope.lookupvar('apt::codename') %>
+Explanation: Debian <%= codename=scope.lookupvar('::debian_codename') %>
Package: *
-Pin: release o=Debian,a=<%= scope.lookupvar('apt::release') %>,v=<%= scope.lookupvar('apt::release_version') %>*
+Pin: release o=Debian,a=<%= scope.lookupvar('::debian_release') %>,v=5*
Pin-Priority: 990
Explanation: Debian backports
@@ -8,7 +8,7 @@ Package: *
Pin: origin backports.debian.org
Pin-Priority: 200
-Explanation: Debian <%= next_release=scope.lookupvar('apt::next_release') %>
+Explanation: Debian <%= next_release=scope.lookupvar('::debian_nextrelease') %>
Package: *
Pin: release o=Debian,a=<%= next_release %>
Pin-Priority: 2
diff --git a/templates/Debian/preferences_squeeze.erb b/templates/Debian/preferences_squeeze.erb
index efe7720..885edc7 100644
--- a/templates/Debian/preferences_squeeze.erb
+++ b/templates/Debian/preferences_squeeze.erb
@@ -1,4 +1,4 @@
-Explanation: Debian <%= codename=scope.lookupvar('apt::codename') %>
+Explanation: Debian <%= codename=scope.lookupvar('::debian_codename') %>
Package: *
Pin: release o=Debian,n=<%= codename %>
Pin-Priority: 990
@@ -8,7 +8,12 @@ Package: *
Pin: release o=Debian,n=<%= codename %>-updates
Pin-Priority: 990
-Explanation: Debian <%= next_codename=scope.lookupvar('apt::next_codename') %>
+Explanation: Debian <%= codename %>-lts
+Package: *
+Pin: release o=Debian,n=<%= codename %>-lts
+Pin-Priority: 990
+
+Explanation: Debian <%= next_codename=scope.lookupvar('::debian_nextcodename') %>
Package: *
Pin: release o=Debian,n=<%= next_codename %>
Pin-Priority: 2
diff --git a/templates/Debian/preferences_wheezy.erb b/templates/Debian/preferences_wheezy.erb
index 0cc0e5c..106108d 100644
--- a/templates/Debian/preferences_wheezy.erb
+++ b/templates/Debian/preferences_wheezy.erb
@@ -1,4 +1,4 @@
-Explanation: Debian <%= codename=scope.lookupvar('apt::codename') %>
+Explanation: Debian <%= codename=scope.lookupvar('::debian_codename') %>
Package: *
Pin: release o=Debian,n=<%= codename %>
Pin-Priority: 990
diff --git a/templates/Debian/sources.list.erb b/templates/Debian/sources.list.erb
index b2ea727..44eea53 100644
--- a/templates/Debian/sources.list.erb
+++ b/templates/Debian/sources.list.erb
@@ -1,88 +1,76 @@
# This file is managed by puppet
# all local modifications will be overwritten
-### Debian current: <%= codename=scope.lookupvar('apt::codename') %>
+### Debian current: <%= codename=scope.lookupvar('::debian_codename') %>
# basic
deb <%= debian_url=scope.lookupvar('apt::debian_url') %> <%= codename %> <%= lrepos=scope.lookupvar('apt::real_repos') %>
-<% if scope.lookupvar('apt::include_src') -%>
+<% if include_src=scope.lookupvar('apt::include_src') -%>
deb-src <%= debian_url %> <%= codename %> <%= lrepos %>
<% end -%>
# security
-<% if ((release=scope.lookupvar('apt::release')) == "unstable" || release == "experimental" || codename == "lenny" ) -%>
-# There is no security support for <%= release %>
-<% else -%>
+<% if ((release=scope.lookupvar('::debian_release')) == "stable" || release == "oldstable") -%>
deb <%= security_url=scope.lookupvar('apt::security_url') %> <%= codename %>/updates <%= lrepos %>
-<% if @include_src -%>
+<% if include_src -%>
deb-src <%= security_url %> <%= codename %>/updates <%= lrepos %>
<% end -%>
-<% end -%>
-
-# backports
-<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
-# There is no backports archive for <%= release %>
<% else -%>
-deb <%= backports_url=scope.lookupvar('apt::backports_url') %> <%= codename %>-backports <%= lrepos %>
-<% if include_src -%>
-deb-src <%= backports_url %> <%= codename %>-backports <%= lrepos %>
-<% end -%>
+# There is no security support for <%= release %>
<% end -%>
<% if use_volatile=scope.lookupvar('apt::use_volatile') -%>
# volatile
-<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
+<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
# There is no volatile archive for <%= release %>
-<% else -%>
-<% if (codename == "lenny" || codename == "etch") -%>
-deb <%= volatile_url=scope.lookupvar('apt::volatile_url') %> <%= codename %>/volatile <%= lrepos %>
-<% if include_src -%>
-deb-src <%= volatile_url %> <%= codename %>/volatile <%= lrepos %>
-<% end -%>
-<% else -%>
+<% else -%>
deb <%= debian_url %> <%= codename %>-updates <%= lrepos %>
-<% if include_src -%>
+<% if include_src -%>
deb-src <%= debian_url %> <%= codename %>-updates <%= lrepos %>
-<% end -%>
+<% end
+ end
+ end -%>
+
+<% if use_lts=scope.lookupvar('apt::use_lts') -%>
+# LTS
+<% if release_lts=scope.lookupvar('::debian_lts') == "false" -%>
+# There is no LTS archive for <%= release %>
+<% else -%>
+deb <%= debian_url %> <%= codename %>-lts <%= lrepos %>
+<% if include_src -%>
+deb-src <%= debian_url %> <%= codename %>-lts <%= lrepos %>
<% end -%>
<% end -%>
<% end -%>
<% if next_release=scope.lookupvar('apt::use_next_release') -%>
-### Debian next: <%= next_release=scope.lookupvar('apt::next_release') ; next_codename=scope.lookupvar('apt::next_codename') %>
+### Debian next: <%= next_release=scope.lookupvar('::debian_nextrelease') ; next_codename=scope.lookupvar('::debian_nextcodename') %>
# basic
deb <%= debian_url %> <%= next_codename %> <%= lrepos %>
-<% if include_src then -%>
+<% if include_src -%>
deb-src <%= debian_url %> <%= next_codename %> <%= lrepos %>
-<% end -%>
+<% end -%>
# security
-<% if (next_release == "unstable" || next_release == "experimental") -%>
+<% if (next_release == "unstable" || next_release == "experimental") -%>
# There is no security support for <%= next_release %>
-<% else -%>
+<% else -%>
deb <%= security_url %> <%= next_codename %>/updates <%= lrepos %>
-<% if include_src then -%>
+<% if include_src then -%>
deb-src <%= security_url %> <%= next_codename %>/updates <%= lrepos %>
-<% end -%>
-<% end -%>
+<% end
+ end -%>
-<% if use_volatile -%>
+<% if use_volatile -%>
# volatile
-<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") -%>
+<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") -%>
# There is no volatile archive for <%= next_release %>
-<% else -%>
-<% if (next_codename == "lenny" || next_codename == "etch") -%>
-deb <%= volatile_url %> <%= next_codename %>/volatile <%= lrepos %>
-<% if include_src then -%>
-deb-src <%= volatile_url %> <%= next_codename %>/volatile <%= lrepos %>
-<% end -%>
-<% else -%>
+<% else -%>
deb <%= debian_url %> <%= next_codename %>-updates <%= lrepos %>
-<% if include_src then -%>
+<% if include_src -%>
deb-src <%= debian_url %> <%= next_codename %>-updates <%= lrepos %>
-<% end -%>
-<% end -%>
-<% end -%>
-<% end -%>
-<% end -%>
+<% end
+ end
+ end
+ end -%>
diff --git a/templates/Ubuntu/preferences_maverick.erb b/templates/Ubuntu/preferences_maverick.erb
index 801ddd4..8e5481d 100644
--- a/templates/Ubuntu/preferences_maverick.erb
+++ b/templates/Ubuntu/preferences_maverick.erb
@@ -1,4 +1,4 @@
-Explanation: Ubuntu <%= codename=scope.lookupvar('apt::codename') %> security
+Explanation: Ubuntu <%= codename=scope.lookupvar('::ubuntu_codename') %> security
Package: *
Pin: release o=Ubuntu,a=<%= codename %>-security
Pin-Priority: 990
@@ -18,7 +18,7 @@ Package: *
Pin: release a=<%= codename %>-backports
Pin-Priority: 200
-Explanation: Ubuntu <%= next_release=scope.lookupvar('apt::next_release') %>
+Explanation: Ubuntu <%= next_release=scope.lookupvar('::ubuntu_nextcodename') %>
Package: *
Pin: release o=Ubuntu,a=<%= next_release %>
Pin-Priority: 2
diff --git a/templates/Ubuntu/preferences_utopic.erb b/templates/Ubuntu/preferences_utopic.erb
new file mode 120000
index 0000000..3debe4f
--- /dev/null
+++ b/templates/Ubuntu/preferences_utopic.erb
@@ -0,0 +1 @@
+preferences_maverick.erb \ No newline at end of file
diff --git a/templates/Ubuntu/preferences_vivid.erb b/templates/Ubuntu/preferences_vivid.erb
new file mode 120000
index 0000000..3debe4f
--- /dev/null
+++ b/templates/Ubuntu/preferences_vivid.erb
@@ -0,0 +1 @@
+preferences_maverick.erb \ No newline at end of file
diff --git a/templates/Ubuntu/preferences_wily.erb b/templates/Ubuntu/preferences_wily.erb
new file mode 120000
index 0000000..3debe4f
--- /dev/null
+++ b/templates/Ubuntu/preferences_wily.erb
@@ -0,0 +1 @@
+preferences_maverick.erb \ No newline at end of file
diff --git a/templates/Ubuntu/preferences_xenial.erb b/templates/Ubuntu/preferences_xenial.erb
new file mode 120000
index 0000000..3debe4f
--- /dev/null
+++ b/templates/Ubuntu/preferences_xenial.erb
@@ -0,0 +1 @@
+preferences_maverick.erb \ No newline at end of file
diff --git a/templates/Ubuntu/sources.list.erb b/templates/Ubuntu/sources.list.erb
index c1a6115..e6d2f64 100644
--- a/templates/Ubuntu/sources.list.erb
+++ b/templates/Ubuntu/sources.list.erb
@@ -1,26 +1,22 @@
# This file is managed by puppet
# all local modifications will be overwritten
-# basic <%= codename=scope.lookupvar('apt::codename') %>
+# basic <%= codename=scope.lookupvar('::ubuntu_codename') %>
deb <%= ubuntu_url=scope.lookupvar('apt::ubuntu_url') %> <%= codename %> <%= lrepos=scope.lookupvar('apt::real_repos') %>
<% if include_src=scope.lookupvar('apt::include_src') -%>
deb-src <%= ubuntu_url %> <%= codename %> <%= lrepos %>
<% end -%>
+<% if use_volatile=scope.lookupvar('apt::use_volatile') -%>
# updates
deb <%= ubuntu_url %> <%= codename %>-updates <%= lrepos %>
-<% if include_src -%>
+<% if include_src -%>
deb-src <%= ubuntu_url %> <%= codename %>-updates <%= lrepos %>
-<% end -%>
+<% end
+ end -%>
# security suppport
deb <%= ubuntu_url %> <%= codename %>-security <%= lrepos %>
<% if include_src -%>
deb-src <%= ubuntu_url %> <%= codename %>-security <%= lrepos %>
<% end -%>
-
-# backports
-deb <%= ubuntu_url %> <%= codename %>-backports main <%= lrepos %>
-<% if include_src -%>
-deb-src <%= ubuntu_url %> <%= codename %>-backports <%= lrepos %>
-<% end -%>
diff --git a/templates/preferences_snippet.erb b/templates/preferences_snippet.erb
index b7acaab..903e73d 100644
--- a/templates/preferences_snippet.erb
+++ b/templates/preferences_snippet.erb
@@ -1,4 +1,4 @@
-Package: <%= real_package %>
-Pin: <%= pin %>
-Pin-Priority: <%= priority %>
+Package: <%= @real_package %>
+Pin: <%= @pin %>
+Pin-Priority: <%= @priority %>
diff --git a/templates/preferences_snippet_release.erb b/templates/preferences_snippet_release.erb
index 845d23f..b95d3f8 100644
--- a/templates/preferences_snippet_release.erb
+++ b/templates/preferences_snippet_release.erb
@@ -1,4 +1,4 @@
-Package: <%= real_package %>
-Pin: release a=<%= release %>
-Pin-Priority: <%= priority %>
+Package: <%= @real_package %>
+Pin: release a=<%= @release %>
+Pin-Priority: <%= @priority %>