# a class to manage the cephfsvol defines class profiles::storage::cephfsvols ( Hash[String, Hash] $volumes, ) { $volumes.each |String $title, Hash $params| { $ensure = pick($params['ensure'], 'mounted') $owner = pick($params['owner'], 'root') $group = pick($params['group'], 'root') $mode = pick($params['mode'], '0755') $mount = $params['mount'] $mount_options = pick($params['mount_options'], ['noatime', 'nodiratime']) $cephfs_mon = pick($params['cephfs_mon'], 'ceph-mon.service.consul') $cephfs_path = pick($params['cephfs_path'], '/') $cephfs_name = $params['cephfs_name'] $cephfs_fs = $params['cephfs_fs'] $keyring = $params['keyring'] profiles::storage::cephfsvol { $title: ensure => $ensure, owner => $owner, group => $group, mode => $mode, mount => $mount, mount_options => $mount_options, cephfs_mon => $cephfs_mon, cephfs_path => $cephfs_path, cephfs_name => $cephfs_name, cephfs_fs => $cephfs_fs, keyring => $keyring, # Optional metaparameters like `require` * => $params.filter |$k, $v| { $k in ['require', 'before', 'notify', 'subscribe'] }, } } }