From 13510476b0ef4844de5120de39ce8aaa12390de0 Mon Sep 17 00:00:00 2001 From: Bohdan Dobrelia Date: Tue, 17 Mar 2026 13:32:28 +0100 Subject: [PATCH] nova05: populate ceph_conf from files by ceph.yml The ceph.yml post_stage_run hook (via cifmw_ceph_client role) writes Ceph config files to cifmw_ceph_client_fetch_dir (default /tmp/). This template reads those files and provides them as base64-encoded values under data.ceph_conf (DCN convention). Generated-by: claude-4.6-opus-high Signed-off-by: Bohdan Dobrelia --- .../edpm-nodeset-values-post-ceph/values.yaml.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/ci_gen_kustomize_values/templates/nova05epsilon/edpm-nodeset-values-post-ceph/values.yaml.j2 diff --git a/roles/ci_gen_kustomize_values/templates/nova05epsilon/edpm-nodeset-values-post-ceph/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/nova05epsilon/edpm-nodeset-values-post-ceph/values.yaml.j2 new file mode 100644 index 0000000000..002e4d8b90 --- /dev/null +++ b/roles/ci_gen_kustomize_values/templates/nova05epsilon/edpm-nodeset-values-post-ceph/values.yaml.j2 @@ -0,0 +1,15 @@ +--- +# source: nova05epsilon/edpm-nodeset-values-post-ceph/values.yaml.j2 +# Auto-populates ceph_conf from files written by ceph.yml hook. +# The ceph.yml post_stage_run hook (via cifmw_ceph_client role) writes +# Ceph config files to cifmw_ceph_client_fetch_dir (default /tmp/). +# This template reads those files and provides them as base64-encoded +# values under data.ceph_conf (DCN convention). +{% set _fetch_dir = cifmw_ceph_client_fetch_dir | default('/tmp') %} +{% set _cluster = cifmw_ceph_client_cluster | default('ceph') %} +{% set _conf_file = (_fetch_dir, _cluster ~ '.conf') | path_join %} +{% set _keyring_file = (_fetch_dir, _cluster ~ '.client.openstack.keyring') | path_join %} +data: + ceph_conf: + {{ _cluster }}.client.openstack.keyring: {{ lookup('file', _keyring_file, rstrip=False) | b64encode }} + {{ _cluster }}.conf: {{ lookup('file', _conf_file, rstrip=False) | b64encode }}