File tree Expand file tree Collapse file tree 5 files changed +63
-21
lines changed Expand file tree Collapse file tree 5 files changed +63
-21
lines changed Original file line number Diff line number Diff line change @@ -140,3 +140,10 @@ cifmw_cephadm_update_log_commands:
140140 cmd : " log last cephadm"
141141cifmw_cephadm_wait_for_dashboard_retries : 10
142142cifmw_cephadm_wait_for_dashboard_delay : 20
143+ # Repository parameters
144+ cifmw_cephadm_repository_override : false
145+ # we usually support N+1 Ceph version: Adding Squid here because Reef is the
146+ # default version installed in a greenfield scenario
147+ cifmw_cephadm_version : " squid"
148+ # bug in cephadm: if you skip "prepare host" it will fail
149+ cifmw_cephadm_prepare_host : false
Original file line number Diff line number Diff line change 5555 {% if not cifmw_cephadm_default_container %}--image {{ cifmw_cephadm_container_ns + '/' + cifmw_cephadm_container_image + ':' + cifmw_cephadm_container_tag|string }} \{% endif %}
5656 bootstrap \
5757 --skip-firewalld \
58+ {% if not cifmw_cephadm_prepare_host %}
5859 --skip-prepare-host \
60+ {% endif %}
5961 --ssh-private-key /home/{{ cifmw_cephadm_ssh_user }}/.ssh/id_rsa \
6062 --ssh-public-key /home/{{ cifmw_cephadm_ssh_user }}/.ssh/id_rsa.pub \
6163 --ssh-user {{ cifmw_cephadm_ssh_user }} \
Original file line number Diff line number Diff line change 1+ ---
2+ # Copyright 2024 Red Hat, Inc.
3+ # All Rights Reserved.
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License"); you may
6+ # not use this file except in compliance with the License. You may obtain
7+ # a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+ # License for the specific language governing permissions and limitations
15+ # under the License.
16+
17+ - name : Enabled ceph Tools Repository
18+ when :
19+ - cifmw_cephadm_repository_override | bool
20+ become : true
21+ ansible.builtin.dnf :
22+ name : centos-release-ceph-{{ cifmw_cephadm_version }}
23+ state : present
24+
25+ - name : Install cephadm package
26+ become : true
27+ when :
28+ - cifmw_cephadm_predeployed | bool or
29+ cifmw_cephadm_repository_override | bool
30+ ansible.builtin.dnf :
31+ name : cephadm
32+ state : present
33+
34+ - name : Stat cephadm file
35+ ansible.builtin.stat :
36+ path : " {{ cifmw_cephadm_bin }}"
37+ register : stat_cephadm
38+ become : true
39+ ignore_errors : true # noqa: ignore-errors
40+
41+ - name : Fail if cephadm is not available
42+ when :
43+ - not stat_cephadm.stat.exists
44+ ansible.builtin.fail :
45+ msg : " {{ cifmw_cephadm_bin }} does not exist"
Original file line number Diff line number Diff line change 2121 tags :
2222 - always
2323
24- - name : Install cephadm package # noqa: package-latest
25- become : true
26- when :
27- - cifmw_cephadm_predeployed | bool
28- ansible.builtin.package :
29- name : cephadm
30- state : latest
31- releasever : " {{ ansible_facts['distribution_major_version'] }}"
32-
33- - name : Stat cephadm file
34- ansible.builtin.stat :
35- path : " {{ cifmw_cephadm_bin }}"
36- register : stat_cephadm
37- become : true
38- ignore_errors : true # noqa: ignore-errors
39-
40- - name : Fail if cephadm is not available
41- when :
42- - not stat_cephadm.stat.exists
43- ansible.builtin.fail :
44- msg : " {{ cifmw_cephadm_bin }} does not exist"
24+ - name : Install cephadm package
25+ ansible.builtin.include_tasks : install_cephadm.yml
4526
4627- name : List Ceph daemon instances on this host
4728 ansible.builtin.command :
Original file line number Diff line number Diff line change 343343 dashboard_enabled : true
344344 cephfs_enabled : true
345345 ceph_nfs_enabled : true
346+ # Override the Ceph container tag and deploy Squid
347+ cifmw_cephadm_container_tag : " v19"
348+ # Override the Ceph Tools repo and install cephadm Squid
349+ cifmw_cephadm_repository_override : true
350+ cifmw_cephadm_version : " squid"
351+ cifmw_cephadm_prepare_host : true
352+
346353 files :
347354 - ^hooks/playbooks/control_plane_ceph_backends.yml
348355 - ^hooks/playbooks/control_plane_hci_pre_deploy.yml
You can’t perform that action at this time.
0 commit comments