# Why does this array variable not expand in package?

I have been trying to get this to work today and I don't understand why it wont work. Can someone give me a hint please?

class omd {
$prereqs = [ "debconf-2.0", "libapache2-mod-python", "libapache2-mod-php5", "php5-sqlite", "php5-mcrypt", "libgd2-xpm", "libdbi0", "libapache2-mod-proxy-html", "xinetd", "mysql-server", "graphviz", "dnsutils", "snmp", "fping", "smbclient", "unzip", "libnet-snmp-perl", "libxml-simple-perl", ] package {${prereqs} :
ensure  => installed,
}


The error I get is: Could not parse for environment production: Could not match ${prereqs} at modules/omd/manifests/init.pp:25[K Many thanks edit retag close merge delete ## 1 Answer Sort by » oldest newest most voted Bare variables should not be surrounded by curly braces. Try this instead: package {$prereqs:
ensure  => installed,
}

more

( 2015-01-13 02:24:04 -0500 )edit