Puppet Class: lvs::realserver

Defined in:
modules/lvs/manifests/realserver.pp

Overview

Class: lvs::realserver

Sets up a server to be used as a 'real server' by LVS

Parameters:

- $realserver_ips
    Array or hash (name => ip) of service IPs to answer on

Parameters:

  • realserver_ips (Any) (defaults to: [])


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'modules/lvs/manifests/realserver.pp', line 10

class lvs::realserver($realserver_ips=[]) {

    package { 'wikimedia-lvs-realserver':
        ensure  => present,
        require => File['/etc/default/wikimedia-lvs-realserver'],
    }

    file { '/etc/default/wikimedia-lvs-realserver':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        content => template('lvs/wikimedia-lvs-realserver.erb'),
    }

    exec { '/usr/sbin/dpkg-reconfigure -p critical -f noninteractive wikimedia-lvs-realserver':
        path        => '/bin:/sbin:/usr/bin:/usr/sbin',
        refreshonly => true,
        require     => Package['wikimedia-lvs-realserver'],
        subscribe   => File['/etc/default/wikimedia-lvs-realserver'],
    }
}