feat: add cephfs shared volume define

- add ceph class to manage ceph client configuration/packages
- add cephfs define for mounting volumes
- add ceph keyring define to manage secrets used to mount cephfs
This commit is contained in:
2024-06-23 15:15:14 +10:00
parent 8eca497ea2
commit 5631f07e6e
6 changed files with 145 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
# profiles::ceph::keyring
define profiles::ceph::keyring (
String $key,
String $user = $name,
String $type = 'client',
Stdlib::Filemode $mode = '0600',
String $owner = 'ceph',
String $group = 'ceph',
Stdlib::Absolutepath $keyring_dir = '/etc/ceph',
) {
$keyring_file = "${keyring_dir}/ceph.${type}.${user}.keyring"
file { $keyring_file:
ensure => file,
owner => $owner,
group => $group,
mode => $mode,
content => Sensitive(template('profiles/ceph/keyring.erb')),
require => File[$keyring_dir],
}
}