On 2/5/15 11:24 AM, Danny Roberts wrote:
> I am trying to configure NGINX entirely within Hiera. For the most part
> this is very easy as the module directly supports setting things up in
> Hiera.
>
> Where I am having an issue though is when creating an upstream in Hiera
> I am wanting to pass the 'ip_hash' parameter to it. The in source docs
> <
https://github.com/jfryman/puppet-nginx/blob/master/manifests/resource/upstream.pp#L28-L40> show
> an example of doing this from in a manifest but not Hiera. So I came up
> with this Hiera code for the upstream:
>
> |
> nginx::nginx_upstreams:
> 'mycluster':
> ensure:'present'
> members:['
192.168.0.1:80','
192.168.0.2:80']
> upstream_cfg_prepend:
> ip_hash:''
> |
>
>
> Though presumably because the value of that hash key/value pair is empty the ip_hash variable does not get added to the resulting config file on the server, you just get a blank line inserted. I've done some searching and cannot find a way to make this work in Hiera so it may simply not be possible, but does anyone know a way around this?
>
Hi,
It appears that ip_hash is being represented as a string instead of a
hash itself. If you are not going to give ip_hash any values, I don't
think you need to specify it at all.
HTH,
-g
--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile:
+1.206.414.8658