aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-06-08 12:16:46 -0300
committermh <mh@immerda.ch>2012-06-08 12:16:46 -0300
commitac166366d7baa45b74e09974289d9fb2dad38e67 (patch)
tree70cc957e8bafd162eb6d378efbc647e3b837a42d /templates
parent39917fb4dbe21b1673ceabaa1d61180cca9f493b (diff)
downloadpuppet-apt-ac166366d7baa45b74e09974289d9fb2dad38e67.tar.gz
puppet-apt-ac166366d7baa45b74e09974289d9fb2dad38e67.tar.bz2
refactor things for >2.7
Diffstat (limited to 'templates')
-rw-r--r--templates/Debian/preferences_lenny.erb8
-rw-r--r--templates/Debian/preferences_squeeze.erb12
-rw-r--r--templates/Debian/preferences_wheezy.erb8
-rw-r--r--templates/Debian/sources.list.erb28
-rw-r--r--templates/Ubuntu/preferences_maverick.erb18
-rw-r--r--templates/Ubuntu/sources.list.erb12
6 files changed, 43 insertions, 43 deletions
diff --git a/templates/Debian/preferences_lenny.erb b/templates/Debian/preferences_lenny.erb
index fb80129..4648ce1 100644
--- a/templates/Debian/preferences_lenny.erb
+++ b/templates/Debian/preferences_lenny.erb
@@ -1,6 +1,6 @@
-Explanation: Debian <%= codename %>
+Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>
Package: *
-Pin: release o=Debian,a=<%= release %>,v=<%= release_version %>*
+Pin: release o=Debian,a=<%= scope.lookupvar('apt::release') %>,v=<%= scope.lookupvar('apt::release_version') %>*
Pin-Priority: 990
Explanation: Debian backports
@@ -8,9 +8,9 @@ Package: *
Pin: origin backports.debian.org
Pin-Priority: 200
-Explanation: Debian <%= next_release %>
+Explanation: Debian <%= scope.lookupvar('apt::next_release') %>
Package: *
-Pin: release o=Debian,a=<%= next_release %>
+Pin: release o=Debian,a=<%= scope.lookupvar('apt::next_release') %>
Pin-Priority: 2
Explanation: Debian sid
diff --git a/templates/Debian/preferences_squeeze.erb b/templates/Debian/preferences_squeeze.erb
index fa0849a..e74515e 100644
--- a/templates/Debian/preferences_squeeze.erb
+++ b/templates/Debian/preferences_squeeze.erb
@@ -1,16 +1,16 @@
-Explanation: Debian <%= codename %>
+Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>
Package: *
-Pin: release o=Debian,n=<%= codename %>
+Pin: release o=Debian,n=<%= scope.lookupvar('::lsbdistcodename') %>
Pin-Priority: 990
-Explanation: Debian <%= codename %>-updates
+Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>-updates
Package: *
-Pin: release o=Debian,n=<%= codename %>-updates
+Pin: release o=Debian,n=<%= scope.lookupvar('::lsbdistcodename') %>-updates
Pin-Priority: 990
-Explanation: Debian <%= next_codename %>
+Explanation: Debian <%= scope.lookupvar('apt::next_codename') %>
Package: *
-Pin: release o=Debian,n=<%= next_codename %>
+Pin: release o=Debian,n=<%= scope.lookupvar('apt::next_codename') %>
Pin-Priority: 2
Explanation: Debian sid
diff --git a/templates/Debian/preferences_wheezy.erb b/templates/Debian/preferences_wheezy.erb
index d5c7af8..e8c15d6 100644
--- a/templates/Debian/preferences_wheezy.erb
+++ b/templates/Debian/preferences_wheezy.erb
@@ -1,11 +1,11 @@
-Explanation: Debian <%= codename %>
+Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>
Package: *
-Pin: release o=Debian,n=<%= codename %>
+Pin: release o=Debian,n=<%= scope.lookupvar('::lsbdistcodename') %>
Pin-Priority: 990
-Explanation: Debian <%= codename %>-updates
+Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>-updates
Package: *
-Pin: release o=Debian,n=<%= codename %>-updates
+Pin: release o=Debian,n=<%= scope.lookupvar('::lsbdistcodename') %>-updates
Pin-Priority: 990
Explanation: Debian sid
diff --git a/templates/Debian/sources.list.erb b/templates/Debian/sources.list.erb
index b0f490f..eaee338 100644
--- a/templates/Debian/sources.list.erb
+++ b/templates/Debian/sources.list.erb
@@ -1,20 +1,20 @@
# This file is managed by puppet
# all local modifications will be overwritten
-### Debian current: <%= codename %>
+### Debian current: <%= codename = scope.lookupvar('::lsbdistcodename') %>
# basic
-deb <%= debian_url %> <%= codename %> <%= repos %>
-<% if include_src then -%>
+deb <%= debian_url=scope.lookupvar('apt::debian_url') %> <%= codename %> <%= repos=scope.lookupvar('apt::repos') %>
+<% if scope.lookupvar('apt::include_src') -%>
deb-src <%= debian_url %> <%= codename %> <%= repos %>
<% end -%>
# security
-<% if (release == "unstable" || release == "experimental") -%>
+<% if ((release=scope.lookupvar('apt::release')) == "unstable" || release == "experimental") -%>
# There is no security support for <%= release %>
<% else -%>
-deb <%= security_url %> <%= codename %>/updates <%= repos %>
-<% if include_src then -%>
+deb <%= security_url=scope.lookupvar('apt::security_url') %> <%= codename %>/updates <%= repos %>
+<% if include_src -%>
deb-src <%= security_url %> <%= codename %>/updates <%= repos %>
<% end -%>
<% end -%>
@@ -23,33 +23,33 @@ deb-src <%= security_url %> <%= codename %>/updates <%= repos %>
<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
# There is no backports archive for <%= release %>
<% else -%>
-deb <%= backports_url %> <%= codename %>-backports <%= repos %>
-<% if include_src then -%>
+deb <%= backports_url=scope.lookupvar('apt::backports_url') %> <%= codename %>-backports <%= repos %>
+<% if include_src -%>
deb-src <%= backports_url %> <%= codename %>-backports <%= repos %>
<% end -%>
<% end -%>
-<% if use_volatile -%>
+<% if use_volatile=scope.lookupvar('apt::use_volatile') -%>
# volatile
<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
# There is no volatile archive for <%= release %>
<% else -%>
<% if (codename == "lenny" || codename == "etch") -%>
-deb <%= volatile_url %> <%= codename %>/volatile <%= repos %>
-<% if include_src then -%>
+deb <%= volatile_url=scope.lookupvar('apt::volatile_url') %> <%= codename %>/volatile <%= repos %>
+<% if include_src -%>
deb-src <%= volatile_url %> <%= codename %>/volatile <%= repos %>
<% end -%>
<% else -%>
deb <%= debian_url %> <%= codename %>-updates <%= repos %>
-<% if include_src then -%>
+<% if include_src -%>
deb-src <%= debian_url %> <%= codename %>-updates <%= repos %>
<% end -%>
<% end -%>
<% end -%>
<% end -%>
-<% if use_next_release then -%>
-### Debian next: <%= next_codename %>
+<% if next_release=scope.lookupvar('apt::use_next_release') -%>
+### Debian next: <%= next_codename=scope.lookupvar('apt::next_codename') %>
# basic
deb <%= debian_url %> <%= next_codename %> <%= repos %>
diff --git a/templates/Ubuntu/preferences_maverick.erb b/templates/Ubuntu/preferences_maverick.erb
index 30d3ec6..6f6ea45 100644
--- a/templates/Ubuntu/preferences_maverick.erb
+++ b/templates/Ubuntu/preferences_maverick.erb
@@ -1,26 +1,26 @@
-Explanation: Ubuntu <%= codename %> security
+Explanation: Ubuntu <%= scope.lookupvar('::lsbdistcodename') %> security
Package: *
-Pin: release o=Ubuntu,a=<%= codename %>-security
+Pin: release o=Ubuntu,a=<%= scope.lookupvar('::lsbdistcodename') %>-security
Pin-Priority: 990
-Explanation: Ubuntu <%= codename %> updates
+Explanation: Ubuntu <%= scope.lookupvar('::lsbdistcodename') %> updates
Package: *
-Pin: release o=Ubuntu,a=<%= codename %>-updates
+Pin: release o=Ubuntu,a=<%= scope.lookupvar('::lsbdistcodename') %>-updates
Pin-Priority: 980
-Explanation: Ubuntu <%= codename %>
+Explanation: Ubuntu <%= scope.lookupvar('::lsbdistcodename') %>
Package: *
-Pin: release o=Ubuntu,a=<%= codename %>
+Pin: release o=Ubuntu,a=<%= scope.lookupvar('::lsbdistcodename') %>
Pin-Priority: 970
Explanation: Ubuntu backports
Package: *
-Pin: release a=<%= codename %>-backports
+Pin: release a=<%= scope.lookupvar('::lsbdistcodename') %>-backports
Pin-Priority: 200
-Explanation: Ubuntu <%= next_release %>
+Explanation: Ubuntu <%= scope.lookupvar('apt::next_release') %>
Package: *
-Pin: release o=Ubuntu,a=<%= next_release %>
+Pin: release o=Ubuntu,a=<%= scope.lookupvar('apt::next_release') %>
Pin-Priority: 2
Explanation: Ubuntu fallback
diff --git a/templates/Ubuntu/sources.list.erb b/templates/Ubuntu/sources.list.erb
index b5725f5..c1a6c1e 100644
--- a/templates/Ubuntu/sources.list.erb
+++ b/templates/Ubuntu/sources.list.erb
@@ -1,26 +1,26 @@
# This file is managed by puppet
# all local modifications will be overwritten
-# basic <%= lsbdistcodename %>
-deb <%= ubuntu_url %> <%= lsbdistcodename %> <%= repos %>
-<% if include_src then -%>
+# basic <%= lsbdistcodename=scope.lookupvar('::lsbdistcodename') %>
+deb <%= ubuntu_url=scope.lookupvar('apt::ubuntu_url') %> <%= lsbdistcodename %> <%= repos=scope.lookupvar('apt::repos') %>
+<% if include_src=scope.lookupvar('apt::include_src') -%>
deb-src <%= ubuntu_url %> <%= lsbdistcodename %> <%= repos %>
<% end -%>
# updates
deb <%= ubuntu_url %> <%= lsbdistcodename %>-updates <%= repos %>
-<% if include_src then -%>
+<% if include_src -%>
deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-updates <%= repos %>
<% end -%>
# security suppport
deb <%= ubuntu_url %> <%= lsbdistcodename %>-security <%= repos %>
-<% if include_src then -%>
+<% if include_src -%>
deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-security <%= repos %>
<% end -%>
# backports
deb <%= ubuntu_url %> <%= lsbdistcodename %>-backports main <%= repos %>
-<% if include_src then -%>
+<% if include_src -%>
deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-backports <%= repos %>
<% end -%>