Created
May 28, 2015 12:53
-
-
Save johnfitzpatrick/a1b7a3194d8c388b7b1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package 'haproxy' do | |
action :install | |
end | |
pool_members = search("node","role:webserver") | |
template "/etc/haproxy/haproxy.cfg" do | |
source "haproxy.cfg.erb" | |
owner "root" | |
group "root" | |
mode 0644 | |
variables :pool_members => pool_members.uniq | |
notifies :restart, "service[haproxy]" | |
end | |
service 'haproxy' do | |
action [:start, :enable] | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment