34 lines
642 B
Django/Jinja
34 lines
642 B
Django/Jinja
{% macro nodes() %}
|
|
{%- for _host in groups['ceph-nodes'] %}
|
|
service_type: host
|
|
addr: {{hostvars[_host]['addr']}}
|
|
hostname: {{ _host }}
|
|
location:
|
|
{% for key, value in hostvars[_host]['location'].items() %}
|
|
{{key}}: {{value}}
|
|
{% endfor %}
|
|
labels:
|
|
{% for i in hostvars[_host]['labels']%}
|
|
- {{ i }}
|
|
{% endfor %}
|
|
---
|
|
{% endfor %}
|
|
{% endmacro %}
|
|
{{ nodes() }}
|
|
service_type: mon
|
|
placement:
|
|
label: "mon"
|
|
---
|
|
service_type: mgr
|
|
service_name: mgr
|
|
placement:
|
|
label: "mgr"
|
|
---
|
|
service_type: osd
|
|
service_id: All_disks
|
|
service_name: osd.all-available-devices
|
|
placement:
|
|
label: "osd"
|
|
spec:
|
|
data_devices:
|
|
all: true |