29d65b95b1
The logging task removes all files from /etc/rsyslog.d, while cluster-haproxy (executed later in the deployment graph) wants to put its rsyslog configuration there. This commit moves HAProxy rsyslog configuration to cluster::haproxy::rsyslog class, and defines it in both logging task and cluster:haproxy class. Change-Id: I2b450ef8d8de4fc9d41ada458af26ab91b9c871e Closes-Bug: 1524687
28 lines
665 B
Puppet
28 lines
665 B
Puppet
# == Class: cluster::haproxy::rsyslog
|
|
#
|
|
# Configure rsyslog for corosync/pacemaker managed HAProxy
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*log_file*]
|
|
# Log file location for haproxy. Defaults to '/var/log/haproxy.log'
|
|
#
|
|
class cluster::haproxy::rsyslog (
|
|
$log_file = '/var/log/haproxy.log',
|
|
) {
|
|
include ::rsyslog::params
|
|
|
|
file { '/etc/rsyslog.d/haproxy.conf':
|
|
ensure => present,
|
|
content => template("${module_name}/haproxy.conf.erb"),
|
|
notify => Service[$::rsyslog::params::service_name],
|
|
}
|
|
|
|
if !defined(Service[$::rsyslog::params::service_name]) {
|
|
service { $::rsyslog::params::service_name:
|
|
ensure => 'running',
|
|
enable => true,
|
|
}
|
|
}
|
|
}
|