[Pkg-puppet-devel] Bug#529554: onlyif/unless as metaparameters
Jayen Ashar
jayen at science.unsw.edu.au
Wed May 20 02:21:57 UTC 2009
Package: puppet
Version: 0.24.7-2
Severity: wishlist
I'd like to make a rule to remove a dead link. I'd like to use the file type as follows:
file {
"/usr/share/man/man1/x-window-manager.1.gz":
ensure => absent,
onlyif => "test -L /usr/share/man/man1/x-window-manager.1.gz && (stat -L /usr/share/man/man1/x-window-manager.1.gz; [ $? != 0 ])";
}
instead of the exec type, as I am doing now:
exec {
"rm /usr/share/man/man1/x-window-manager.1.gz":
onlyif => "test -L /usr/share/man/man1/x-window-manager.1.gz && (stat -L /usr/share/man/man1/x-window-manager.1.gz; [ $? != 0 ])",
path => "/usr/bin:/usr/sbin:/bin";
}
This could be doable if onlyif was a metaparameter.
-- System Information:
Debian Release: 4.0
APT prefers oldstable
APT policy: (500, 'oldstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-etchnhalf.1-686-bigmem
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Versions of packages puppet depends on:
ii adduser 3.102 Add and remove users and groups
ii facter 1.3.5-1 a library for retrieving facts fro
ii libopenssl-ruby 1.0.0+ruby1.8.2-1 OpenSSL interface for Ruby
ii libshadow-ruby1.8 1.4.1-7 Interface of shadow password for R
ii libxmlrpc-ruby 1.8.2-1 XML-RPC support for Ruby
ii lsb-base 3.1-23.2etch1 Linux Standard Base 3.1 init scrip
ii ruby 1.8.2-1 An interpreter of object-oriented
Versions of packages puppet recommends:
pn libaugeas-ruby1.8 <none> (no description available)
ii rdoc 1.8.2-1 Generate documentation from ruby s
-- no debconf information
More information about the Pkg-puppet-devel
mailing list