Hi all

this isnt working . I dont know why. Can you help please?

message
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
Internal Server Error: org.jruby.exceptions.RaiseException: (SyntaxError) 
/etc/puppetlabs/code/environments/teg17_uat/modules/apache/templates/confd/workers.properties.erb:14:
 
syntax error, unexpected end-of-file
_erbout.force_encoding(__ENCODING__)



puppet code:

if $worker_list != undef {        file { 'workers.properties':          ensure  
=> file,          path    => "${::apache::conf_dir}/workers.properties",        
  mode    => $::apache::file_mode,          content => 
template('apache/confd/workers.properties.erb'),          notify  => 
Class['apache::service'],        }      }




template

#workersworker.list=<%= @worker_list.sort_by {|key, v| key}.map{|key, v| 
key}.join(',') -%><% @worker_list.each do |name, content| -%>worker.<%= name 
%>.type=<%= content['type'] %>worker.<%= name %>.port=<%= content['port'] 
%>worker.<%= name %>.host=<%= content['host'] %>worker.<%= name 
%>.socket_keepalive=<%= content['socket_keepalive'] %>worker.<%= name 
%>.ping_mode=<%= content['ping_mode'] %><% if @lbfactor -%>worker.<%= name 
%>.lbfactor=<%= content['lbfactor'] %><% end %><% if @balanced_workers 
-%>worker.<%= name %>.balanced_workers=<%= content['balanced_workers'] %><% end 
%><% if @sticky_session -%>worker.<%= name %>.sticky_session=<%= 
content['sticky_session'] %><% end %><% end -%>



eg data from hiera:

cncblaspringfield:        type: ajp13        port: 8017        host: 
vlspringfield.com        socket_keepalive: true        ping_mode: A        
ping_timeout: 60000        lbfactor: 1    cncdbla_loadbalancer:        type: lb 
       balanced_workers: "cncbla_dover,cncblaspringfield"        
sticky_session: 1


Note: the idea is to apply the last 3 only if the last 3 variables (lbfactor 
, etc) have content.


Tks in advance! 

-- 
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/ca02dfc6-d3cc-4476-bc24-e5afec545d4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to