mirror of https://github.com/ceph/ceph-ansible.git
132 lines
4.1 KiB
YAML
132 lines
4.1 KiB
YAML
---
|
|
- name: make sure public_network configured
|
|
fail:
|
|
msg: "public_network must be configured. Ceph public network"
|
|
when:
|
|
- public_network == '0.0.0.0/0'
|
|
|
|
- name: make sure cluster_network configured
|
|
fail:
|
|
msg: "cluster_network must be configured. Ceph replication network"
|
|
when:
|
|
- cluster_network == '0.0.0.0/0'
|
|
- not containerized_deployment
|
|
|
|
- name: make sure journal_size configured
|
|
debug:
|
|
msg: "WARNING: journal_size is configured to {{ journal_size }}, which is less than 5GB. This is not recommended and can lead to severe issues."
|
|
when:
|
|
- journal_size|int < 5120
|
|
- osd_objectstore == 'filestore'
|
|
- osd_group_name in group_names
|
|
|
|
- name: make sure an osd scenario was chosen
|
|
fail:
|
|
msg: "please choose an osd scenario"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not containerized_deployment
|
|
- osd_scenario == 'dummy'
|
|
|
|
- name: make sure a valid osd scenario was chosen
|
|
fail:
|
|
msg: "please choose an osd scenario, valid scenarios are {{ valid_osd_scenarios }}"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not containerized_deployment
|
|
- not osd_scenario in valid_osd_scenarios
|
|
|
|
- name: verify devices have been provided
|
|
fail:
|
|
msg: "please provide devices to your osd scenario"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not osd_auto_discovery
|
|
- not osd_scenario == "lvm"
|
|
- devices|length == 0
|
|
|
|
- name: check if osd_scenario lvm is supported by the selected ceph version
|
|
fail:
|
|
msg: "osd_scenario lvm is not supported by the selected Ceph version, use Luminous or newer."
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not containerized_deployment
|
|
- osd_scenario == "lvm"
|
|
- ceph_release_num.{{ ceph_release }} < ceph_release_num.luminous
|
|
|
|
- name: verify osd_objectstore is 'filestore' when using the lvm osd_scenario
|
|
fail:
|
|
msg: "the lvm osd_scenario currently only works for filestore, not bluestore"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- osd_scenario == "lvm"
|
|
- not osd_auto_discovery
|
|
- osd_objectstore != 'filestore'
|
|
|
|
- name: verify lvm_volumes have been provided
|
|
fail:
|
|
msg: "please provide lvm_volumes to your osd scenario"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- osd_scenario == "lvm"
|
|
- not osd_auto_discovery
|
|
- lvm_volumes|length == 0
|
|
|
|
- name: make sure the lvm_volumes variable is a list
|
|
fail:
|
|
msg: "lvm_volumes: must be a list"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not osd_auto_discovery
|
|
- osd_scenario == "lvm"
|
|
- lvm_volumes is string
|
|
|
|
- name: make sure the devices variable is a list
|
|
fail:
|
|
msg: "devices: must be a list, not a string, i.e. [ \"/dev/sda\" ]"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not osd_auto_discovery
|
|
- devices is string
|
|
|
|
- name: verify journal devices have been provided
|
|
fail:
|
|
msg: "please provide devices and raw journal devices to your osd scenario"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not containerized_deployment
|
|
- osd_scenario == 'non-collocated'
|
|
- dedicated_devices|length == 0
|
|
or devices|length == 0
|
|
|
|
- name: make sure the dedicated_devices variable is a list
|
|
fail:
|
|
msg: "dedicated_devices: must be a list, not a string, i.e. [ \"/dev/sda\" ]"
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not containerized_deployment
|
|
- osd_scenario == 'non-collocated'
|
|
- dedicated_devices is string
|
|
- dedicated_devices|length == 0
|
|
or devices|length == 0
|
|
|
|
- name: check if bluestore is supported by the selected ceph version
|
|
fail:
|
|
msg: "bluestore is not supported by the selected Ceph version, use Luminous or above."
|
|
when:
|
|
- osd_group_name is defined
|
|
- osd_group_name in group_names
|
|
- not containerized_deployment
|
|
- osd_objectstore == 'bluestore'
|
|
- ceph_release_num.{{ ceph_release }} < ceph_release_num.luminous
|