Skip to content

Instantly share code, notes, and snippets.

@big-samantha
Created November 12, 2012 23:35
Show Gist options
  • Select an option

  • Save big-samantha/4062806 to your computer and use it in GitHub Desktop.

Select an option

Save big-samantha/4062806 to your computer and use it in GitHub Desktop.
# Install and configure haproxy.
class haproxy ($haproxycfg) {
include
'::haproxy::install',
'::haproxy::config',
'::haproxy::service'
Class['::haproxy::install'] -> Class['::haproxy::config']
Class['::haproxy::config'] ~> Class['::haproxy::service']
}
# configure haproxy
class haproxy::config inherits ::haproxy {
file { 'haproxy.cfg':
ensure => present,
content => $haproxycfg,
path => '/etc/haproxy/haproxy.cfg',
owner => root,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment