Puppet Class: labstore::rsync::syncserver

Defined in:
modules/labstore/manifests/rsync/syncserver.pp

Overview

Parameters:

  • datapath (Stdlib::Unixpath) (defaults to: '/exp')
  • interval (Integer) (defaults to: 600)
  • primary_host (Stdlib::Host) (defaults to: undef)
  • partner_host (Stdlib::Host) (defaults to: undef)
  • niceness (String) (defaults to: '+10')
  • is_active (Boolean) (defaults to: false)
  • cluster_ip (Stdlib::IP::Address) (defaults to: undef)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'modules/labstore/manifests/rsync/syncserver.pp', line 1

class labstore::rsync::syncserver(
    Stdlib::Unixpath $datapath = '/exp',
    Integer $interval=600,
    Stdlib::Host $primary_host=undef,
    Stdlib::Host $partner_host=undef,
    String $niceness = '+10',
    Boolean $is_active = false,
    Stdlib::IP::Address $cluster_ip = undef,
)  {
    include labstore::backup_keys

    file { '/usr/local/sbin/syncserver':
        ensure => 'present',
        mode   => '0755',
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/labstore/syncserver.py',
    }

    $ensure = $is_active? {
        true    => 'present',
        default => 'absent',
    }
    systemd::service { 'syncserver':
        ensure    => $ensure,
        content   => systemd_template('syncserver'),
        subscribe => File['/usr/local/sbin/syncserver'],
    }
}