File: nfs.pp

package info (click to toggle)
puppet-module-manila 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,804 kB
  • sloc: ruby: 4,767; python: 38; makefile: 10; sh: 10
file content (55 lines) | stat: -rw-r--r-- 1,767 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
52
53
54
55
# == Class: manila::data::backup::nfs
#
# Setup Manila to backup shares into NFS
#
# === Parameters
#
# [*backup_mount_export*]
#   (Required) NFS backup export location.
#   Defaults to $facts['os_service_default']
#
# [*backup_mount_template*]
#   (Optional) The template for mounting NFS shares.
#   Defaults to $facts['os_service_default']
#
# [*backup_unmount_template*]
#   (Optional) The template for unmounting NFS shares.
#   Defaults to $facts['os_service_default']
#
# [*backup_mount_proto*]
#   (Optional) Mount Protocol for mounting NFS shares.
#   Defaults to $facts['os_service_default']
#
# [*backup_mount_options*]
#   (Optional) Mount ptions passed to the NFS client.
#   Defaults to $facts['os_service_default']
#
# [*package_ensure*]
#   (optional) Ensure state for package. Defaults to 'present'.
#
class manila::data::backup::nfs (
  String[1] $backup_mount_export,
  $backup_mount_template   = $facts['os_service_default'],
  $backup_unmount_template = $facts['os_service_default'],
  $backup_mount_proto      = $facts['os_service_default'],
  $backup_mount_options    = $facts['os_service_default'],
  $package_ensure          = 'present',
) {

  include manila::deps
  include manila::params

  manila_config {
    'DEFAULT/backup_mount_template':   value => $backup_mount_template;
    'DEFAULT/backup_unmount_template': value => $backup_unmount_template;
    'DEFAULT/backup_mount_export':     value => $backup_mount_export;
    'DEFAULT/backup_mount_proto':      value => $backup_mount_proto;
    'DEFAULT/backup_mount_options':    value => $backup_mount_options;
  }

  ensure_packages('nfs-client', {
    name   => $::manila::params::nfs_client_package_name,
    ensure => $package_ensure,
    tag    => 'manila-support-package',
  })
}