Puppet Class: kickstack::cinder::volume

Inherits:
kickstack
Defined in:
manifests/cinder/volume.pp

Overview



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
# File 'manifests/cinder/volume.pp', line 1

class kickstack::cinder::volume inherits kickstack {

  include kickstack::cinder::config

  class { '::cinder::volume': }

  case $::kickstack::cinder_backend {
    'iscsi': {
      $pv = "$::kickstack::cinder_lvm_pv"
      $vg = "$::kickstack::cinder_lvm_vg"
      physical_volume { "$pv":
        ensure => present
      }
      volume_group { "$vg":
        ensure => present,
        physical_volumes => "$pv",
        require => Physical_volume["$pv"]
      }
      class { '::cinder::volume::iscsi': 
        iscsi_ip_address => '0.0.0.0',
        require => Volume_group["$vg"]
      }
    }
    'rbd': {
      $rbd_secret_uuid = getvar("${fact_prefix}rbd_secret_uuid")
      class { '::cinder::volume::rbd':
        rbd_pool => $cinder_rbd_pool,
        rbd_user => $cinder_rbd_user,
        rbd_secret_uuid => $rbd_secret_uuid
      }
    }
  }
}