Hi,

please note that

create_resources('iis::manage_site', hiera_hash('iis::sites', []))

is not the most atomic way of looking up hiera data at all. You could do
the same thing like this:

$sites = hiera('iis::sites', {})
create_resources('iis::manage_site', $sites)

This gives you the advantage of being able to just work with the $sites
hash as well.

$addr_web1 = $sites['myweb1']['ip_address']

Further notes:
1. Don't pass [] as the default value for a hash lookup. Use {}.
2. Use hiera_hash() only if you need to merge hash data from all
hierarchy layers.

HTH,
Felix

On 11/25/2014 05:59 PM, Helen Paterson wrote:
> Hi,
> 
> I have the following hiera data in the node definition. I can lookup all
> the data create_resources('iis::manage_site', hiera_hash('iis::sites',
> [])) .
> 
> iis::sites:
>  'myweb1':
>     site_path: 'D:\Repositories\myweb1\wwwroot'
>     port: '80'
>     ip_address: '192.168.33.21'
>     app_pool: 'ColdFusion'
>  'myweb2':
>     site_path: 'D:\Repositories\myweb2\wwwroot'
>     port: '81'
>     ip_address: '192.168.33.22'
>     app_pool: 'ColdFusion'
> 
> 
> 
> But how do i just extract the ip_address ?
> 
> 
> Regards
> 
> Helen

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5475B155.8090906%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to