- 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
53 lines
1.3 KiB
Puppet
53 lines
1.3 KiB
Puppet
# profiles::ceph::client
|
|
class profiles::ceph::client (
|
|
String $fsid,
|
|
Array[Stdlib::Host] $mons,
|
|
Stdlib::Absolutepath $config_file = '/etc/ceph/ceph.conf',
|
|
Boolean $manage_ceph_conf = true,
|
|
Boolean $manage_ceph_package = true,
|
|
Boolean $manage_ceph_paths = true,
|
|
String $owner = 'ceph',
|
|
String $group = 'ceph',
|
|
Stdlib::Filemode $mode = '0644',
|
|
Hash $keyrings = {},
|
|
) {
|
|
|
|
# dont run this on proxmox nodes
|
|
if $facts['enc_role'] != 'roles::infra::proxmox::node' {
|
|
|
|
# install the ceph client package
|
|
if $manage_ceph_package {
|
|
package { 'ceph-common':
|
|
ensure => installed,
|
|
}
|
|
}
|
|
|
|
# manage the ceph directory
|
|
if $manage_ceph_paths {
|
|
file { '/etc/ceph':
|
|
ensure => directory,
|
|
owner => $owner,
|
|
group => $group,
|
|
mode => $mode,
|
|
require => Package['ceph-common'],
|
|
}
|
|
}
|
|
|
|
# create a basic client config
|
|
if $manage_ceph_conf {
|
|
file { $config_file:
|
|
ensure => file,
|
|
owner => $owner,
|
|
group => $group,
|
|
mode => $mode,
|
|
content => template('profiles/ceph/client.conf.erb'),
|
|
require => Package['ceph-common'],
|
|
}
|
|
}
|
|
|
|
# manage ceph keyrings
|
|
create_resources('profiles::ceph::keyring', $keyrings)
|
|
}
|
|
|
|
}
|