Sebastien Badia f5ce6f955b (maint) Move specific distro params to cloud::params class
No features added, just a sanitize of cloud::loadbalancer class,
this commit move specific params (os case) to the dedicated class.

Refs: #675
2014-10-11 17:24:04 +02:00

57 lines
1.8 KiB
Puppet

#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: cloud::params
#
# Configure set of default parameters
#
class cloud::params {
# cloud::logging::agent
$logging_agent_logrotate_rule = {
'td-agent' => {
'path' => '/var/log/td-agent/td-agent.log',
'rotate' => 30,
'compress' => true,
'delaycompress' => true,
'ifempty' => false,
'create' => true,
'create_mode' => '640',
'create_owner' => 'td-agent',
'create_group' => 'td-agent',
'sharedscripts' => true,
'postrotate' => ['pid=/var/run/td-agent/td-agent.pid', 'test -s $pid && kill -USR1 "$(cat $pid)"'],
}
}
case $::osfamily {
'RedHat': {
# Specific to Red Hat
$start_haproxy_service = '"/usr/bin/systemctl start haproxy"'
$stop_haproxy_service = '"/usr/bin/systemctl stop haproxy"'
$horizon_auth_url = 'dashboard'
} # RedHat
'Debian': {
# Specific to Debian / Ubuntu
$start_haproxy_service = '"/etc/init.d/haproxy start"'
$stop_haproxy_service = '"/etc/init.d/haproxy stop"'
$horizon_auth_url = 'horizon'
} # Debian
default: {
fail("Unsupported osfamily (${::osfamily})")
}
}
}