From 383137e0fb064d96cb0de5e52698006b025a006d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 25 Jan 2008 16:41:26 -0500 Subject: use apt-get instead of dselect and create a dselect class for dselect configuration, making dselect optional --- manifests/init.pp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index 2128e2f..de4754e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -14,9 +14,7 @@ class apt { default => $apt_clean, } - package { - [apt, dselect]: ensure => installed, - } + package { apt: ensure => installed } # a few templates need lsbdistcodename include assert_lsbdistcodename @@ -62,21 +60,14 @@ class apt { # watch apt.conf.d file { "/etc/apt/apt.conf.d": ensure => directory, checksum => mtime; } - # suppress annoying help texts of dselect - line { dselect_expert: - file => "/etc/dpkg/dselect.cfg", - line => "expert", - ensure => present, - } - exec { # "&& sleep 1" is workaround for older(?) clients - "/usr/bin/dselect update && sleep 1 #on refresh": + "/usr/bin/apt-get update && sleep 1 #on refresh": refreshonly => true, subscribe => [ File["/etc/apt/sources.list"], File["/etc/apt/preferences"], File["/etc/apt/apt.conf.d"], File[apt_config] ]; - "/usr/bin/dselect update && /usr/bin/apt-get autoclean #hourly": + "/usr/bin/apt-get update && /usr/bin/apt-get autoclean #hourly": require => [ File["/etc/apt/sources.list"], File["/etc/apt/preferences"], File[apt_config] ], # Another Semaphor for all packages to reference @@ -98,7 +89,7 @@ class apt { source => "puppet://$servername/apt/backports.org.key", mode => 0444, owner => root, group => root, } - exec { "/usr/bin/apt-key add ${apt_base_dir}/backports.org.key && dselect update": + exec { "/usr/bin/apt-key add ${apt_base_dir}/backports.org.key && apt-get update": alias => "backports_key", refreshonly => true, subscribe => File["${apt_base_dir}/backports.org.key"], @@ -107,3 +98,14 @@ class apt { } } } + +class dselect { + # suppress annoying help texts of dselect + line { dselect_expert: + file => "/etc/dpkg/dselect.cfg", + line => "expert", + ensure => present, + } + + package { dselect: ensure => installed } +} -- cgit v1.2.3