Hi, I have this definiton for keepalived. And i need to feed the template
this array that i will loop trough.
site.pp definition snippet:
> keepalived::vrrp_virtual_server {
real_servers = { realserver1 => { ip => '192.168.33.10',
>
port => '80',
weight => '100'
checktype => 'TCP_CHECK',
connect_timeout => '5',
connect_port => '80'
}
realserver2 => { ip => '192.168.33.20',
port => '80',
>
weight => '100'
checktype => 'TCP_CHECK',
connect_timeout => '5',
connect_port => '80'
>
}
}
keepalived manifest snippet:
define keepalived::vrrp_virtual_server(
> $real_servers
>
Template snippet:
<% real_servers.each do |key,value| -%>
> real_server <%= value['ip'] %> <%= value['port'] %>
> weight <%= value['weight'] %>
> <%= value['checktype'] %>
> connect_timeout <%= value['connect_timeout'] %>
> connect_port <%= value['connect_port'] %>
I keep getting:
*Could not parse for environment production: Syntax error at '='; expected
'}' at /etc/puppet/manifests/site.pp:53
*
What is the right syntax for an array in a definition in site.pp?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/eDzTXglLGksJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.