Skip to content

Commit 6b9caf5

Browse files
fultonjopenshift-merge-bot[bot]
authored andcommitted
[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 <fulton@redhat.com>
1 parent 56153d4 commit 6b9caf5

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

roles/cifmw_cephadm/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ that they do not need to be changed for a typical EDPM deployment.
4444
`cifmw_cephadm_container_image` (e.g. "ceph") and
4545
`cifmw_cephadm_container_tag` (e.g. "v18").
4646

47+
* `cifmw_cephadm_rpm_url`: (String) URL to a specific cephadm RPM package.
48+
When set, cephadm is installed directly from this URL instead of from
49+
the configured repository. This is useful for testing pre-release builds
50+
or specific versions. Defaults to `""` (empty string, uses repository
51+
installation).
52+
4753
* `cifmw_cephadm_spec_ansible_host`: the path to the Ceph spec
4854
generated by the `cifmw_ceph_spec` role (e.g. `/tmp/ceph_spec.yml`).
4955

roles/cifmw_cephadm/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ cifmw_cephadm_version: "squid"
152152
cifmw_cephadm_prepare_host: false
153153
cifmw_cephadm_wait_install_retries: 8
154154
cifmw_cephadm_wait_install_delay: 15
155+
cifmw_cephadm_rpm_url: ""
155156
cifmw_cephadm_rgw_ingress_service_name: "ingress.rgw.default"
156157
cifmw_cephadm_rgw_ingress_service_id: "rgw.default"
157158
cifmw_cephadm_rgw_port: 8080

roles/cifmw_cephadm/tasks/install_cephadm.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
name: centos-release-ceph-{{ cifmw_cephadm_version }}
2323
state: present
2424

25-
- name: Install cephadm package
25+
- name: Install cephadm package from repository
2626
become: true
2727
when:
28+
- cifmw_cephadm_rpm_url | length == 0
2829
- cifmw_cephadm_predeployed | bool or
2930
cifmw_cephadm_repository_override | bool
3031
ansible.builtin.dnf:
@@ -35,6 +36,19 @@
3536
delay: "{{ cifmw_cephadm_wait_install_delay }}"
3637
until: task_result is success
3738

39+
- name: Install cephadm package from URL
40+
become: true
41+
when:
42+
- cifmw_cephadm_rpm_url | length > 0
43+
ansible.builtin.dnf:
44+
name: "{{ cifmw_cephadm_rpm_url }}"
45+
state: present
46+
disable_gpg_check: true
47+
register: task_result
48+
retries: "{{ cifmw_cephadm_wait_install_retries }}"
49+
delay: "{{ cifmw_cephadm_wait_install_delay }}"
50+
until: task_result is success
51+
3852
- name: Stat cephadm file
3953
ansible.builtin.stat:
4054
path: "{{ cifmw_cephadm_bin }}"

0 commit comments

Comments
 (0)