Hi List,
I have two questions.
Firstly I want to be able to ensure a default package is installed
across all hosts unless I specifically require them to be absent.
To do this I have created a module(httpd) and class(php_mod) and
definition(php_mod_add) which I want to declare at the default node or
individual node level.
node mel_default_preview inherits mel_default_web {
class { httpd: version => "2.2.3-43.el5.centos.3" }
class { php: version => "5.2.9-2" }
include dev_httpd::php_dev_httpd
include php_mod
php_mod::php_mod_add {
"php-pgsql":
ensure => present,
type => "rpm";
"channel://pear.php.net/OLE-1.0.0RC1":
ensure => present,
type => "pear";
"channel://pear.php.net/Spreadsheet_Excel_Writer-0.9.2":
ensure => present,
type => "pear";
}
}
node au-mel-preview-1 inherits mel_default_preview {
php_mod::php_mod_add {
"php-pgsql":
ensure => absent,
type => "rpm";
}
}
When I do this it obviously complains about being defined twice - how
do I get around that?
Here is the define I'm using:
define php_mod_add ($ensure = absent, $type = "rpm") {
# Get the module name from the name variable.
$mod = $name
if ($type == "rpm") {
case $ensure {
present: {
notice("$mod present")
package { $mod: ensure => installed }
}
absent: {
notice("$mod absent")
package { $mod: ensure => absent }
}
}
}
Also in the node definition, how do I make sure that
"channel://pear.php.net/OLE-1.0.0RC1":
runs before
"channel://pear.php.net/Spreadsheet_Excel_Writer-0.9.2"?
Could I do that in a require or something? I'm running 2.6.1-5.
Thanks,
DenMat
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.