Skip to content

Instantly share code, notes, and snippets.

@specialunderwear
Created September 5, 2012 22:51
Show Gist options
  • Save specialunderwear/3646817 to your computer and use it in GitHub Desktop.
Save specialunderwear/3646817 to your computer and use it in GitHub Desktop.
haproxy config
# 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