Hello Alan,
I've got a file resource that makes sure a specific directory tree is
created..
$dirs = ["/var", "/var/lanl", "/var/lanl/puppet"]
@file { $dirs :
ensure => directory,
owner => "root",
group => "wheel",
mode => 755,
links => follow,
}
I would think that setting up a $packages array in the right order and
doing something like:
package{ $packages :
ensure => present,
}
would work... I'm currently on 0.25.1, and hoping that it'll still work
that way when I upgrade.
Regards,
-Roy
On 6/15/10 10:00 AM, Alan Barrett wrote:
I have some software with a list of patches that need to be installed in
order. Different hosts want different patches (e.g. development hosts
get patches that are not yet ready for production).
Obviously I can do this:
package { "basepackage":
ensure => present,
}
package { "patch1":
ensure => present,
require => Package["basepackage"],
package { "patch2":
ensure => present,
require => Package["patch1"],
}
package { "patch3":
ensure => present,
require => Package["patch2"],
}
but I'd like to do something like this:
$package_list => ["basepackage", "patch1", "patch2", "patch3"]
# The above value would actually come from extlookup()
install_packages_in_order { "title":
package_list => $package_list
}
define install_packages_in_order($package_list) {
...insert code here...
}
or with alternating package names and version numbers:
$package_list = ["basepackage", "1.2.3",
"patch1", "1.2.3.0.1",
"patch2", "1.2.3.0.2",
"patch3", "1.2.3.0.3"]
I think I can make this work using some ugly code inside
inline_template, or maybe writing my own parser functions,
but does anybody have any easier suggestions?
--apb (Alan Barrett)
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.