Puppet Class: psick::keepalived::balanced_host
- Defined in:
- manifests/keepalived/balanced_host.pp
Overview
class psick::keepalived::balanced_host Smape class to add to hosts to be balanced by psick::keepalived
| 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # File 'manifests/keepalived/balanced_host.pp', line 5
class psick::keepalived::balanced_host (
  String $vip,
  Array $ports,
  String $lb_type               = 'keepalived',
  String $lb_name               = 'default',
  Boolean $lb_active            = true,
  Hash $lb_options              = { },
  Optional[String] $lb_template = undef,
) {
  if $lb_active {
    $default_lb_options = {
      'connect_timeout' => 5,
      'paths'           => [ '/' ],
    }
    $real_lb_options = $default_lb_options + $lb_options
    psick::keepalived::balance { 'default':
      vip         => $vip,
      ports       => $ports,
      lb_options  => $real_lb_options,
      lb_template => $lb_template,
    }
  }
} |