Skip to content

Commit 1a14f0f

Browse files
authored
Merge pull request #33 from cityofships/multiyaml
Fix templating multi-document OSD specs
2 parents bfeb3f4 + 097fe76 commit 1a14f0f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roles/cephadm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ All Ceph hosts must be in the `ceph` group.
4848
- /dev/sdb
4949
- /dev/sdc
5050
```
51-
* `cephadm_osd_spec`: OSD spec to apply in yaml format
51+
* `cephadm_osd_spec`: OSD spec to apply in YAML (recommended) or dict format
5252
Example:
5353
```
54-
cephadm_osd_spec:
54+
cephadm_osd_spec: |
5555
service_type: osd
5656
service_id: osd_spec_default
5757
placement:

roles/cephadm/tasks/osds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
vars:
2020
fsid: "{{ cephadm_fsid if cephadm_fsid | length > 0 else cephadm_fsid_current.stdout }}"
2121
copy:
22-
content: "{{ cephadm_osd_spec | to_nice_yaml(indent=2) }}"
22+
content: "{{ cephadm_osd_spec | to_nice_yaml if cephadm_osd_spec is mapping else cephadm_osd_spec }}"
2323
dest: "/var/run/ceph/{{ fsid }}/osd_spec.yml"
2424
owner: root
2525
group: root

0 commit comments

Comments
 (0)