mirror of https://github.com/ceph/ceph-ansible.git
37 lines
1.5 KiB
YAML
37 lines
1.5 KiB
YAML
---
|
|
- name: Import ceph-facts role
|
|
ansible.builtin.import_role:
|
|
name: ceph-facts
|
|
tasks_from: get_def_crush_rule_name.yml
|
|
|
|
- name: Create filesystem pools
|
|
ceph_pool:
|
|
name: "{{ item.name }}"
|
|
cluster: "{{ cluster }}"
|
|
pg_num: "{{ item.pg_num | default(omit) }}"
|
|
pgp_num: "{{ item.pgp_num | default(omit) }}"
|
|
size: "{{ item.size | default(omit) }}"
|
|
min_size: "{{ item.min_size | default(omit) }}"
|
|
pool_type: "{{ item.type | default('replicated') }}"
|
|
rule_name: "{{ item.rule_name | default(omit) }}"
|
|
erasure_profile: "{{ item.erasure_profile | default(omit) }}"
|
|
pg_autoscale_mode: "{{ item.pg_autoscale_mode | default(omit) }}"
|
|
target_size_ratio: "{{ item.target_size_ratio | default(omit) }}"
|
|
with_items: "{{ cephfs_pools }}"
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
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 }}"
|
|
|
|
- name: Create ceph filesystem
|
|
ceph_fs:
|
|
name: "{{ cephfs }}"
|
|
cluster: "{{ cluster }}"
|
|
data: "{{ cephfs_data_pool.name }}"
|
|
metadata: "{{ cephfs_metadata_pool.name }}"
|
|
max_mds: "{{ mds_max_mds if not rolling_update | bool else omit }}"
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
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 }}"
|