File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ Installs haproxy and prepares the configuration location.
66Changes
77=======
88
9+ ## v1.0.2:
10+
11+ * fix regression introduced in v1.0.1
12+
13+ ## v1.0.1:
14+
15+ * account for the case where load balancer is in the pool
16+
917## v1.0.0:
1018
1119* Use ` node.chef_environment ` instead of ` node['app_environment'] `
Original file line number Diff line number Diff line change 33license "Apache 2.0"
44description "Installs and configures haproxy"
55long_description IO . read ( File . join ( File . dirname ( __FILE__ ) , 'README.md' ) )
6- version "1.0.1 "
6+ version "1.0.2 "
77
88recipe "haproxy" , "Installs and configures haproxy"
99recipe "haproxy::app_lb" , "Installs and configures haproxy by searching for nodes of a particular role"
Original file line number Diff line number Diff line change 1717# limitations under the License.
1818#
1919
20- pool_members = [ ]
21- # if we are the load balancer and pool
20+ pool_members = search ( "node" , "role:#{ node [ 'haproxy' ] [ 'app_server_role' ] } AND chef_environment:#{ node . chef_environment } " ) || [ ]
21+
22+ # load balancer is in the pool
2223if node . run_list . roles . include? ( node [ 'haproxy' ] [ 'app_server_role' ] )
2324 pool_members << node
24- else
25- pool_members << search ( "node" , "role:#{ node [ 'haproxy' ] [ 'app_server_role' ] } AND chef_environment:#{ node . chef_environment } " )
2625end
2726
2827package "haproxy" do
4645 owner "root"
4746 group "root"
4847 mode 0644
49- variables :pool_members => pool_members
48+ variables :pool_members => pool_members . uniq
5049 notifies :restart , "service[haproxy]"
5150end
You can’t perform that action at this time.
0 commit comments