Defined Type: lvm::volume_group

Defined in:
vendor_modules/lvm/manifests/volume_group.pp

Overview

Define: lvm::volume_group

Parameters:

  • physical_volumes (Variant[Hash, Array, String])
  • createonly (Boolean) (defaults to: false)
  • ensure (Enum['present', 'absent']) (defaults to: present)
  • logical_volumes (Hash) (defaults to: {})
  • followsymlinks (Boolean) (defaults to: false)


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
# File 'vendor_modules/lvm/manifests/volume_group.pp', line 3

define lvm::volume_group (
  Variant[Hash, Array, String] $physical_volumes,
  Boolean $createonly               = false,
  Enum['present', 'absent'] $ensure = present,
  Hash $logical_volumes             = {},
  Boolean $followsymlinks           = false,
) {

  if is_hash($physical_volumes) {
    create_resources(
      'lvm::physical_volume',
      $physical_volumes,
      {
        ensure           => $ensure,
      }
    )
  }
  else {
    physical_volume { $physical_volumes:
      ensure => $ensure,
    }
  }


  volume_group { $name:
    ensure           => $ensure,
    createonly       => $createonly,
    physical_volumes => $physical_volumes,
    followsymlinks   => $followsymlinks,
  }

  create_resources(
    'lvm::logical_volume',
    $logical_volumes,
    {
      ensure       => $ensure,
      volume_group => $name,
    }
  )
}