puppet-prod/site/profiles/manifests/storage/cephfsvols.pp
Ben Vincent 1d23fef82e feat: update settings for ceph (#298)
- enable root logins via ssh with keys
- add ssh key for ceph to root user

Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/298
2025-05-25 20:22:00 +10:00

37 lines
1.3 KiB
Puppet

# 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'] },
}
}
}