le1t0-deprec 2.1.6.027 → 2.1.6.028
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/deprec/recipes/haproxy.rb +6 -0
- data/lib/deprec/templates/haproxy/haproxy.cfg.erb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -42,6 +42,11 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
42
42
|
"srvtimeout" => 50000
|
43
43
|
}
|
44
44
|
}
|
45
|
+
|
46
|
+
task :create_haproxy_user, :roles => :haproxy do
|
47
|
+
deprec2.groupadd(haproxy_group) unless haproxy_group == 'root'
|
48
|
+
deprec2.useradd(haproxy_user, :group => haproxy_group) unless haproxy_user == 'root'
|
49
|
+
end
|
45
50
|
|
46
51
|
# :haproxy_instances should contain a hash with at least one key => value pair. The key should be a string
|
47
52
|
# with the virtual IP address. The value is again a hash with some settings, containing as key => value pairs:
|
@@ -74,6 +79,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
74
79
|
config
|
75
80
|
activate
|
76
81
|
create_check_file
|
82
|
+
create_haproxy_user
|
77
83
|
end
|
78
84
|
|
79
85
|
# default config expects this file in web root
|
@@ -14,7 +14,7 @@ global
|
|
14
14
|
defaults
|
15
15
|
<% unless haproxy_default_options[:stats_auth].nil? || haproxy_default_options[:stats_auth].empty? %>
|
16
16
|
stats enable
|
17
|
-
stats <%= haproxy_default_options[:stats_auth] %>
|
17
|
+
stats auth <%= haproxy_default_options[:stats_auth] %>
|
18
18
|
<% end %>
|
19
19
|
<% (haproxy_default_options[:options] || {}).each do |key, values| [values].flatten.each do |value| %>
|
20
20
|
<%= key %><% if value && value != true %> <%= value %><% end %>
|