ceph-ansible/roles/ceph-osd/tasks/main.yml

114 lines
3.7 KiB
YAML

---
- name: include system_tuning.yml
include: system_tuning.yml
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: install dependencies
package:
name: parted
state: present
when:
- not containerized_deployment
- ansible_os_family != 'ClearLinux'
- name: include common.yml
include: common.yml
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: include ceph_disk_cli_options_facts.yml
include: ceph_disk_cli_options_facts.yml
- name: include build_devices.yml
include: build_devices.yml
- name: read information about the devices
parted:
device: "{{ item }}"
unit: MiB
register: parted_results
with_items: "{{ devices }}"
- name: include check_gpt.yml
include: check_gpt.yml
when:
- osd_scenario != 'lvm'
- name: include scenarios/collocated.yml
include: scenarios/collocated.yml
when:
- osd_scenario == 'collocated'
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: include scenarios/non-collocated.yml
include: scenarios/non-collocated.yml
when:
- not osd_auto_discovery
- osd_scenario == 'non-collocated'
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: include scenarios/lvm.yml
include: scenarios/lvm.yml
when:
- osd_scenario == 'lvm'
- lvm_volumes|length > 0
- not containerized_deployment
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: include scenarios/lvm-batch.yml
include: scenarios/lvm-batch.yml
when:
- osd_scenario == 'lvm'
- devices|length > 0
- not containerized_deployment
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: include activate_osds.yml
include: activate_osds.yml
when:
- not containerized_deployment
- osd_scenario != 'lvm'
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: include start_osds.yml
include: start_osds.yml
when:
- not containerized_deployment
- osd_scenario != 'lvm'
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: include docker/main.yml
include: docker/main.yml
when:
- containerized_deployment
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False
- name: set_fact openstack_keys_tmp - preserve backward compatibility after the introduction of the ceph_keys module
set_fact:
openstack_keys_tmp: "{{ openstack_keys_tmp|default([]) + [ { 'key': item.key, 'name': item.name, 'caps': { 'mon': item.mon_cap, 'osd': item.osd_cap|default(''), 'mds': item.mds_cap|default(''), 'mgr': item.mgr_cap|default('') } , 'mode': item.mode } ] }}"
with_items: "{{ openstack_keys }}"
when:
- openstack_config
- item.get('mon_cap', None) # it's enough to assume we are running an old-fashionned syntax simply by checking the presence of mon_cap since every key needs this cap
- name: set_fact keys - override keys_tmp with keys
set_fact:
openstack_keys: "{{ openstack_keys_tmp }}"
when:
- openstack_keys_tmp is defined
# Create the pools listed in openstack_pools
- name: include openstack_config.yml
include: openstack_config.yml
when:
- openstack_config
- inventory_hostname == groups[osd_group_name] | last