I can understand according to http://docs.puppetlabs.com/guides/language_guide.html that I can pass an array to a definition.
define php::pear() {
package { "`php-${name}": ensure => installed }
}
php::pear { ['ldap', 'mysql', 'ps', 'snmp', 'sqlite', 'tidy', 'xmlrpc']: }
However, is there a way that I can pass more than one array to do the same thing? For instance, if I wanted some pear libraries installed, and some absent, could I do this?
define php::pear($ensure) {
package { "`php-${name}": ensure => $ensure }
}
php::pear { ['ldap', 'mysql', 'ps', 'snmp', 'sqlite', 'tidy', 'xmlrpc']:
ensure => ['installed', 'installed', 'absent', 'absent', 'installed', 'installed', 'installed']
}
Firstly, is something like this possible, or are there better ways of doing something like this with multidimensional arrays or something?
Any help would be appreciated, I'm finding the puppet documentation lacking a little in this area.
Cheers