X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fcinder%2Fmanifests%2Fbackend%2Fnfs.pp;fp=3rdparty%2Fmodules%2Fcinder%2Fmanifests%2Fbackend%2Fnfs.pp;h=137f2697d29d958dab3c4e715da9789f30b3dc4f;hp=0000000000000000000000000000000000000000;hb=4631045ebb77ee8622f6fa09277a50c372bcc02e;hpb=3d4dc4fd9e59bd0e07646c99f6b356c7d9d859aa diff --git a/3rdparty/modules/cinder/manifests/backend/nfs.pp b/3rdparty/modules/cinder/manifests/backend/nfs.pp new file mode 100644 index 00000000..137f2697 --- /dev/null +++ b/3rdparty/modules/cinder/manifests/backend/nfs.pp @@ -0,0 +1,39 @@ +# ==define cinder::backend::nfs +# +# ===Paramiters +# [*volume_backend_name*] +# (optional) Allows for the volume_backend_name to be separate of $name. +# Defaults to: $name +# +# +define cinder::backend::nfs ( + $volume_backend_name = $name, + $nfs_servers = [], + $nfs_mount_options = undef, + $nfs_disk_util = undef, + $nfs_sparsed_volumes = undef, + $nfs_mount_point_base = undef, + $nfs_shares_config = '/etc/cinder/shares.conf', + $nfs_used_ratio = '0.95', + $nfs_oversub_ratio = '1.0', +) { + + file {$nfs_shares_config: + content => join($nfs_servers, "\n"), + require => Package['cinder'], + notify => Service['cinder-volume'] + } + + cinder_config { + "${name}/volume_backend_name": value => $volume_backend_name; + "${name}/volume_driver": value => + 'cinder.volume.drivers.nfs.NfsDriver'; + "${name}/nfs_shares_config": value => $nfs_shares_config; + "${name}/nfs_mount_options": value => $nfs_mount_options; + "${name}/nfs_disk_util": value => $nfs_disk_util; + "${name}/nfs_sparsed_volumes": value => $nfs_sparsed_volumes; + "${name}/nfs_mount_point_base": value => $nfs_mount_point_base; + "${name}/nfs_used_ratio": value => $nfs_used_ratio; + "${name}/nfs_oversub_ratio": value => $nfs_oversub_ratio; + } +}