feat: add ceph service management profiles and facts

Adds Unkin::Ceph::Utils facter module (ceph_services.rb) which detects
ceph service instances via systemctl and exposes is_ceph_mon, is_ceph_mgr,
is_ceph_mds, is_ceph_osd booleans and a ceph_services hash of unit names.

Adds profiles::ceph::mon, mgr, mds, osd — each with a Boolean $ensure_running
parameter that iterates discovered service instances and manages them as
running and enabled. Works across incus nodes (mon/mgr/mds/osd) and k8s
compute/control nodes (osd only).

💘 Generated with Crush

Assisted-by: Claude Sonnet 4.6 via Crush <crush@charm.land>
This commit is contained in:
2026-04-05 22:58:14 +10:00
parent dbe04a91e3
commit 8d8d5fc97a
5 changed files with 101 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
class profiles::ceph::mon (
Boolean $ensure_running = true,
) {
if $ensure_running and $facts['is_ceph_mon'] {
$facts['ceph_services']['mon'].each |String $svc| {
service { $svc:
ensure => running,
enable => true,
}
}
}
}