From 3ab65f56a61cfedbe75a3b41143f0d44fbad0a93 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 12 Oct 2012 11:28:24 -0700 Subject: Rename everything! What is renamed: - Class/define: - haproxy::config to haproxy::listen - haproxy::data to haproxy::params - Parameters: - haproxy::listen listen_ip to ipaddress - haproxy::listen config_options to options - haproxy haproxy_global_options to global_options - haproxy haproxy_defaults_options to defaults_options --- templates/haproxy-base.cfg.erb | 6 +++--- templates/haproxy_config_block.erb | 11 ----------- templates/haproxy_listen_block.erb | 11 +++++++++++ 3 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 templates/haproxy_config_block.erb create mode 100644 templates/haproxy_listen_block.erb (limited to 'templates') diff --git a/templates/haproxy-base.cfg.erb b/templates/haproxy-base.cfg.erb index 3e21436..42e791c 100644 --- a/templates/haproxy-base.cfg.erb +++ b/templates/haproxy-base.cfg.erb @@ -1,5 +1,5 @@ global -<% haproxy_global_options.sort.each do |key,val| -%> +<% global_options.sort.each do |key,val| -%> <% if val.is_a?(Array) -%> <% val.each do |item| -%> <%= key %> <%= item %> @@ -10,7 +10,7 @@ global <% end -%> defaults -<% haproxy_defaults_options.sort.each do |key,val| -%> +<% defaults_options.sort.each do |key,val| -%> <% if val.is_a?(Array) -%> <% val.each do |item| -%> <%= key %> <%= item %> @@ -18,4 +18,4 @@ defaults <% else -%> <%= key %> <%= val %> <% end -%> -<% end -%> \ No newline at end of file +<% end -%> diff --git a/templates/haproxy_config_block.erb b/templates/haproxy_config_block.erb deleted file mode 100644 index 9223140..0000000 --- a/templates/haproxy_config_block.erb +++ /dev/null @@ -1,11 +0,0 @@ - -listen <%= name %> <%= listen_ip %>:<%= Array(ports).join(",#{listen_ip}:") %> -<% config_options.sort.each do |key, val| -%> -<% if val.is_a?(Array) -%> -<% val.each do |item| -%> - <%= key %> <%= item %> -<% end -%> -<% else -%> - <%= key %> <%= val %> -<% end -%> -<% end -%> diff --git a/templates/haproxy_listen_block.erb b/templates/haproxy_listen_block.erb new file mode 100644 index 0000000..66abf1f --- /dev/null +++ b/templates/haproxy_listen_block.erb @@ -0,0 +1,11 @@ + +listen <%= name %> <%= ipaddress %>:<%= Array(ports).join(",#{ipaddress}:") %> +<% options.sort.each do |key, val| -%> +<% if val.is_a?(Array) -%> +<% val.each do |item| -%> + <%= key %> <%= item %> +<% end -%> +<% else -%> + <%= key %> <%= val %> +<% end -%> +<% end -%> -- cgit v1.2.3