i test if multiple packages exist in environment or not, based on test generate final catalog.
if !defined( package[ 'apache2' ] ) { package { 'apache2': ensure => installed, } } if !defined( package[ 'libapache2-svn' ] ) { package { 'libapache2-svn': ensure => installed, } }
in future control in following way:
package { ensure => "installed" } $packagelist = [ 'apache2', 'libapache2-svn' ] if !defined( package[ $packagelist ] ) { package { $packagelist: } }
Comments
Post a Comment