Created
September 5, 2012 22:51
-
-
Save specialunderwear/3646817 to your computer and use it in GitHub Desktop.
haproxy config
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
# collect all the servers with *role* `node`. | |
$nodes = servers_with_role('node') | |
# render a template in wich we use these servers. | |
$configfile = template('path-to-template/configfile.erb') | |
package {"haproxy": | |
ensure => installed, | |
} | |
file {"/etc/haproxy/haproxy.cfg": | |
content => $configfile | |
notify => Service['haproxy'], | |
require => Package['haproxy'], | |
} | |
service {"haproxy": | |
ensure => running, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment