2020-03-27 23:21:09 +08:00
|
|
|
---
|
|
|
|
- name: get current default crush rule details
|
2020-11-10 01:16:41 +08:00
|
|
|
ceph_crush_rule:
|
|
|
|
name: null
|
|
|
|
cluster: "{{ cluster }}"
|
|
|
|
state: info
|
|
|
|
environment:
|
|
|
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
|
|
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
2020-03-27 23:21:09 +08:00
|
|
|
register: default_crush_rule_details
|
|
|
|
delegate_to: "{{ delegated_node | default(groups[mon_group_name][0]) }}"
|
|
|
|
run_once: true
|
|
|
|
|
|
|
|
- name: get current default crush rule name
|
|
|
|
set_fact:
|
|
|
|
ceph_osd_pool_default_crush_rule_name: "{{ item.rule_name }}"
|
2021-12-13 23:36:27 +08:00
|
|
|
with_items: "{{ default_crush_rule_details.stdout | default('{}', True) | from_json }}"
|
2020-03-27 23:21:09 +08:00
|
|
|
run_once: True
|
2021-12-13 23:36:27 +08:00
|
|
|
when: item.rule_id | int == osd_pool_default_crush_rule | int
|