ceph-ansible/roles/ceph-mon/tasks/create_mds_filesystems.yml

41 lines
1.5 KiB
YAML
Raw Normal View History

---
# NOTE (leseb): in the present playbook the conditional is done on the task
# We don't do this in main.yml because of the 'docker' variable, when set to true
# the role 'ceph-common' doesn't get inherited so the condition can not be evaluate
# since those check are performed by the ceph-common role
- name: create filesystem pools
command: ceph --cluster {{ cluster }} osd pool create {{ item }} {{ osd_pool_default_pg_num }}
with_items:
- cephfs_data
- cephfs_metadata
changed_when: false
- name: check if ceph filesystem already exists
command: ceph --cluster {{ cluster }} fs get {{ cephfs }}
register: check_existing_cephfs
changed_when: false
failed_when: false
when: inventory_hostname == groups.mons|last
- name: create ceph filesystem
command: ceph --cluster {{ cluster }} fs new {{ cephfs }} {{ cephfs_metadata }} {{ cephfs_data }}
changed_when: false
when:
- inventory_hostname == groups.mons|last
- check_existing_cephfs.rc != 0
- name: allow multimds
command: ceph --cluster {{ cluster }} fs set {{ cephfs }} allow_multimds true --yes-i-really-mean-it
changed_when: false
when:
- ceph_release_num.{{ ceph_release }} >= ceph_release_num.jewel
- mds_allow_multimds
- name: set max_mds
command: ceph --cluster {{ cluster }} fs set {{ cephfs }} max_mds {{ mds_max_mds }}
changed_when: false
when:
- ceph_release_num.{{ ceph_release }} >= ceph_release_num.jewel
- mds_allow_multimds
- mds_max_mds > 1