From a55d8aae99ee9bd8c6ef26e97bae0091ab1e705f Mon Sep 17 00:00:00 2001 From: John Fulton Date: Wed, 24 Jun 2026 13:01:17 -0400 Subject: [PATCH] [cifmw_cephadm] Add cifmw_cephadm_rpm_url If cifmw_cephadm_rpm_url (default "") is non-empty and set to a valid URL to an RPM (e.g. http://foo.com/cephadm.rpm), then the install_cephadm.yml tasks file will install cephadm from that URL instead of the repository. This option will go unnoticed, since it defaults to "", unless overridden. Jira: OSPRH-31757 Signed-off-by: John Fulton --- roles/cifmw_cephadm/README.md | 6 ++++++ roles/cifmw_cephadm/defaults/main.yml | 1 + roles/cifmw_cephadm/tasks/install_cephadm.yml | 16 +++++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/roles/cifmw_cephadm/README.md b/roles/cifmw_cephadm/README.md index c06ef866c..7d7a87c45 100644 --- a/roles/cifmw_cephadm/README.md +++ b/roles/cifmw_cephadm/README.md @@ -44,6 +44,12 @@ that they do not need to be changed for a typical EDPM deployment. `cifmw_cephadm_container_image` (e.g. "ceph") and `cifmw_cephadm_container_tag` (e.g. "v18"). +* `cifmw_cephadm_rpm_url`: (String) URL to a specific cephadm RPM package. + When set, cephadm is installed directly from this URL instead of from + the configured repository. This is useful for testing pre-release builds + or specific versions. Defaults to `""` (empty string, uses repository + installation). + * `cifmw_cephadm_spec_ansible_host`: the path to the Ceph spec generated by the `cifmw_ceph_spec` role (e.g. `/tmp/ceph_spec.yml`). diff --git a/roles/cifmw_cephadm/defaults/main.yml b/roles/cifmw_cephadm/defaults/main.yml index cd497ed2a..e9201d99a 100644 --- a/roles/cifmw_cephadm/defaults/main.yml +++ b/roles/cifmw_cephadm/defaults/main.yml @@ -152,6 +152,7 @@ cifmw_cephadm_version: "squid" cifmw_cephadm_prepare_host: false cifmw_cephadm_wait_install_retries: 8 cifmw_cephadm_wait_install_delay: 15 +cifmw_cephadm_rpm_url: "" cifmw_cephadm_rgw_ingress_service_name: "ingress.rgw.default" cifmw_cephadm_rgw_ingress_service_id: "rgw.default" cifmw_cephadm_rgw_port: 8080 diff --git a/roles/cifmw_cephadm/tasks/install_cephadm.yml b/roles/cifmw_cephadm/tasks/install_cephadm.yml index d334a725e..f7b66a86c 100644 --- a/roles/cifmw_cephadm/tasks/install_cephadm.yml +++ b/roles/cifmw_cephadm/tasks/install_cephadm.yml @@ -22,9 +22,10 @@ name: centos-release-ceph-{{ cifmw_cephadm_version }} state: present -- name: Install cephadm package +- name: Install cephadm package from repository become: true when: + - cifmw_cephadm_rpm_url | length == 0 - cifmw_cephadm_predeployed | bool or cifmw_cephadm_repository_override | bool ansible.builtin.dnf: @@ -35,6 +36,19 @@ delay: "{{ cifmw_cephadm_wait_install_delay }}" until: task_result is success +- name: Install cephadm package from URL + become: true + when: + - cifmw_cephadm_rpm_url | length > 0 + ansible.builtin.dnf: + name: "{{ cifmw_cephadm_rpm_url }}" + state: present + disable_gpg_check: true + register: task_result + retries: "{{ cifmw_cephadm_wait_install_retries }}" + delay: "{{ cifmw_cephadm_wait_install_delay }}" + until: task_result is success + - name: Stat cephadm file ansible.builtin.stat: path: "{{ cifmw_cephadm_bin }}"