File: storage.pp

package info (click to toggle)
puppet-module-swift 25.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,400 kB
  • sloc: ruby: 9,593; python: 38; sh: 10; makefile: 10
file content (51 lines) | stat: -rw-r--r-- 1,222 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Configures dependencies that are common for all storage
# types.
#   - installs an rsync server
#   - installs required packages
#
# == Parameters
#  [*storage_local_net_ip*] ip address that the swift servers should
#    bind to. Required.
#
#  [*rsync_use_xinetd*]
#   (optional) Override whether to use xinetd to manage rsync service
#   Defaults to swift::params::xinetd_available
#
# == Dependencies
#
# == Examples
#
# == Authors
#
#   Dan Bode dan@puppetlabs.com
#
# == Copyright
#
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
#
class swift::storage(
  $storage_local_net_ip,
  $rsync_use_xinetd               = $::swift::params::xinetd_available,
  Boolean $use_drive_full_checker = false,
) inherits swift::params {

  include swift::deps

  if $rsync_use_xinetd and ! $::swift::params::xinetd_available {
    fail('xinetd is not available in this distro')
  }

  if $use_drive_full_checker {
    $rsyncdconf_path = '/etc/swift/rsyncd.conf'
  } else {
    $rsyncdconf_path = '/etc/rsyncd.conf'
  }

  ensure_resource('class', 'rsync::server', {
    'use_xinetd' => $rsync_use_xinetd,
    'address'    => $storage_local_net_ip,
    'use_chroot' => 'no',
    'conf_file'  => $rsyncdconf_path,
  })
}