feat: manage more ceph requirements

- add ceph-common to provide utilities for managing ceph
- add root and sysadmin ssh keys for ceph deployments
This commit is contained in:
Ben Vincent 2025-05-17 11:07:21 +10:00
parent 92f0ae64b9
commit f1bb392f8d
5 changed files with 31 additions and 14 deletions

View File

@ -36,6 +36,12 @@ lookup_options:
profiles::haproxy::server::listeners: profiles::haproxy::server::listeners:
merge: merge:
strategy: deep strategy: deep
profiles::accounts::root::sshkeys:
merge:
strategy: deep
profiles::accounts::sysadmin::sshkeys:
merge:
strategy: deep
haproxy::backend: haproxy::backend:
merge: merge:
strategy: deep strategy: deep

View File

@ -8,6 +8,7 @@ hiera_include:
profiles::packages::include: profiles::packages::include:
bridge-utils: {} bridge-utils: {}
cephadm: {} cephadm: {}
ceph-common: {}
profiles::pki::vault::alt_names: profiles::pki::vault::alt_names:
- incus.service.consul - incus.service.consul
@ -27,6 +28,11 @@ profiles::ssh::sign::principals:
- "%{hiera('networking_loopback1_ip')}" - "%{hiera('networking_loopback1_ip')}"
- "%{hiera('networking_loopback2_ip')}" - "%{hiera('networking_loopback2_ip')}"
profiles::accounts::root::sshkeys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDEEiTQnbnfgIb2FAvrUzKkznB/Jyq06YXhP3E+Y8SmwFSeLZZPdZhKEiWRv0aY3zBIUgGsKmBXtPd8HTvQn959E6fgs3jNBtBIo76sTaR6LpNhb07tUuQDvycFlv3WZRgRu1s3RifNn0Ozfd7JPJtqjo/FGz8URtypkvOto4NnzkgOSjm1qOS6OjetBL2u+tB/h9vRDWIdKyEWqHp81aNqT9wv9MHMGBUCVNC7/WTblCsmL2rPY289dU9E/Ja5bAbNN+Lp23e8lQ+RoSeWmVIM7VCans78hLPzb2RqwNgWMBR2eStmGtHbOF1QYo3luC2GfGR7ImMfxgrR9NTu56nSHIOO+GCpWZEneIPGyLrL5vWWwhODIAJNjG6qGFeLL4PcQBYabI3fmoyrUOaMohiovLYGYs+9NK8wPOpVIP6i6CBq6RzVCjmgGq8x12dK8JhAkcoTfEcPdQwSJU/LRBFfLtRgtu1nb9BdSmotb3ESTSrXt+RYiPgAxatSSrN00qs= ceph-9a4b6eac-31d1-11f0-a634-00e04c680f5d
profiles::accounts::sysadmin::sshkeys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDEEiTQnbnfgIb2FAvrUzKkznB/Jyq06YXhP3E+Y8SmwFSeLZZPdZhKEiWRv0aY3zBIUgGsKmBXtPd8HTvQn959E6fgs3jNBtBIo76sTaR6LpNhb07tUuQDvycFlv3WZRgRu1s3RifNn0Ozfd7JPJtqjo/FGz8URtypkvOto4NnzkgOSjm1qOS6OjetBL2u+tB/h9vRDWIdKyEWqHp81aNqT9wv9MHMGBUCVNC7/WTblCsmL2rPY289dU9E/Ja5bAbNN+Lp23e8lQ+RoSeWmVIM7VCans78hLPzb2RqwNgWMBR2eStmGtHbOF1QYo3luC2GfGR7ImMfxgrR9NTu56nSHIOO+GCpWZEneIPGyLrL5vWWwhODIAJNjG6qGFeLL4PcQBYabI3fmoyrUOaMohiovLYGYs+9NK8wPOpVIP6i6CBq6RzVCjmgGq8x12dK8JhAkcoTfEcPdQwSJU/LRBFfLtRgtu1nb9BdSmotb3ESTSrXt+RYiPgAxatSSrN00qs= ceph-9a4b6eac-31d1-11f0-a634-00e04c680f5d
# configure consul service # configure consul service
consul::services: consul::services:
incus: incus:

View File

@ -0,0 +1,18 @@
# manage the root user
class profiles::accounts::root (
Optional[Array[String]] $sshkeys = undef,
) {
if $sshkeys {
accounts::user { 'root':
sshkeys => $sshkeys,
}
}
file {'/root/.config':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0600',
}
}

View File

@ -26,7 +26,7 @@ class profiles::base (
include profiles::base::scripts include profiles::base::scripts
include profiles::base::hosts include profiles::base::hosts
include profiles::base::groups include profiles::base::groups
include profiles::base::root include profiles::accounts::root
include profiles::accounts::sysadmin include profiles::accounts::sysadmin
if $facts['virtual'] != 'lxc' { if $facts['virtual'] != 'lxc' {
include profiles::ntp::client include profiles::ntp::client

View File

@ -1,13 +0,0 @@
# manage the root user
class profiles::base::root {
# TODO
# for now, add some root directories
file {'/root/.config':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0600',
}
}