puppet-prod/site/profiles/manifests/ceph/keyring.pp
Ben Vincent 5631f07e6e 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
2024-06-23 15:33:33 +10:00

22 lines
551 B
Puppet

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