Jérémy
2010-Sep-20 21:31 UTC
[Puppet Users] Using an array of arrays from an external node script
Hi guys, I hope you can help me, I looked for it on the list and on the website but I didn''t find any response to my problem. Context : I would like to centralize the package management of my nodes by using a database which would answer me with all the packages ( including package names, configuration file paths and service names ) that might be installed on a node through the external node script. I made this definition : define install_packages($package, $conf_file, $service) { package { $package { ensure => installed, provider => whatever, } file { $conf_file { path => "$conf_file", ensure => present, require => Package[$package] } service { $service { ensure => running, provider => whatever, subscribe => [Package[$package], File[$conf_file]], } } My external node script answer me something like : --- classes: - class1 - class2 - ... parameters: package_list: [[ntp, /etc/ntp.conf, ntpd ], [nscd, /etc/nscd.conf, nscd ].... ] But I can''t find the correct syntax to extract the information from the package_list parameter to the puppet configuration. So my questions : - is that possible? - am I doing it the wrong way ( the main question!! )? - does anyone already experienced such configuration? Thanks -- Jay -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.