]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
add apt-listchanges support. this is a nice compliment to using the upgrade_package...
authorMicah Anderson <micah@riseup.net>
Thu, 9 Dec 2010 03:25:09 +0000 (22:25 -0500)
committerMicah Anderson <micah@riseup.net>
Thu, 9 Dec 2010 03:25:09 +0000 (22:25 -0500)
README
manifests/listchanges.pp [new file with mode: 0644]
templates/Debian/listchanges_lenny.erb [new file with mode: 0644]
templates/Debian/listchanges_squeeze.erb [new symlink]

diff --git a/README b/README
index 355379b95cab14192796034a203679bcf753cbbc..f171e8cd338cebbedb50360c603892f77f38648f 100644 (file)
--- a/README
+++ b/README
@@ -198,6 +198,19 @@ apt::dselect
 This class, when included, installs dselect and switches it to expert mode to
 suppress superfluous help screens.
 
+apt::listchanges
+
+This class, when included, installs apt-listchanges and configures it using the
+following variables, the defaults are below:
+
+ $listchanges_version = "present"
+ $listchanges_config = "apt/${operatingsystem}/listchanges_${lsbrelease}.erb" 
+ $listchanges_frontend = "pager" 
+ $listchanges_email = "root" 
+ $listchanges_confirm = "0" 
+ $listchanges_saveseen = "/var/lib/apt/listchanges.db" 
+ $listchanges_which = "both" 
+
 apt::proxy_client
 -----------------
 
diff --git a/manifests/listchanges.pp b/manifests/listchanges.pp
new file mode 100644 (file)
index 0000000..3b886bf
--- /dev/null
@@ -0,0 +1,38 @@
+class apt::listchanges {
+
+  case $listchanges_version {
+    '': { $listchanges_version = "present" }
+  }
+
+  case $listchanges_config {
+    '': { $listchanges_config = "apt/${operatingsystem}/listchanges_${lsbrelease}.erb" }
+  }
+
+  case $listchanges_frontend {
+    '' { $listchanges_frontend = "pager" }
+  }
+
+  case $listchanges_email {
+    '': { $listchanges_email = "root" }
+  }
+
+  case $listchanges_confirm {
+    '': { $listchanges_confirm = "0" }
+  }
+
+  case $listchanges_saveseen {
+    '': { $listchanges_saveseen = "/var/lib/apt/listchanges.db" }
+  }
+
+  case $listchanges_which {
+    '': { $listchanges_which = "both" }
+  }
+
+  package { apt-listchanges: ensure => $listchanges_ensure_version }
+  
+  file { "/etc/apt/listchanges.conf":
+    content => template($listchanges_config),
+    mode => 0644, owner => root, group => root,
+    require => Package["apt-listchanges"];
+  }
+}
diff --git a/templates/Debian/listchanges_lenny.erb b/templates/Debian/listchanges_lenny.erb
new file mode 100644 (file)
index 0000000..fec3b68
--- /dev/null
@@ -0,0 +1,7 @@
+[apt]
+frontend=<%= listchanges_frontend %>
+email_address=<%= listchanges_email %>
+confirm=<%= listchanges_confirm %>
+save_seen=<%= listchanges_saveseen %>
+which=<%= listchanges_which %>
+
diff --git a/templates/Debian/listchanges_squeeze.erb b/templates/Debian/listchanges_squeeze.erb
new file mode 120000 (symlink)
index 0000000..74ab496
--- /dev/null
@@ -0,0 +1 @@
+listchanges_lenny.erb
\ No newline at end of file