1a0f3c0a6d
UP link: https://github.com/puppetlabs/puppetlabs-haproxy UP commit sha: 4c94112afbb143f54caae0967e29261b41179017 Implements: blueprint ssl-endpoints Change-Id: Icb96703ad50b111af463cb6c4094091a251ca680
35 lines
873 B
Puppet
35 lines
873 B
Puppet
# Private class
|
|
class haproxy::config inherits haproxy {
|
|
if $caller_module_name != $module_name {
|
|
fail("Use of private class ${name} by ${caller_module_name}")
|
|
}
|
|
|
|
concat { $haproxy::config_file:
|
|
owner => '0',
|
|
group => '0',
|
|
mode => '0644',
|
|
}
|
|
|
|
# Simple Header
|
|
concat::fragment { '00-header':
|
|
target => $haproxy::config_file,
|
|
order => '01',
|
|
content => "# This file managed by Puppet\n",
|
|
}
|
|
|
|
# Template uses $global_options, $defaults_options
|
|
concat::fragment { 'haproxy-base':
|
|
target => $haproxy::config_file,
|
|
order => '10',
|
|
content => template('haproxy/haproxy-base.cfg.erb'),
|
|
}
|
|
|
|
if $haproxy::global_options['chroot'] {
|
|
file { $haproxy::global_options['chroot']:
|
|
ensure => directory,
|
|
owner => $haproxy::global_options['user'],
|
|
group => $haproxy::global_options['group'],
|
|
}
|
|
}
|
|
}
|