2014-03-04 02:08:51 +08:00
---
2018-08-10 20:16:30 +08:00
- name : include_tasks system_tuning.yml
include_tasks : system_tuning.yml
2018-03-15 06:39:10 +08:00
2018-04-11 23:15:29 +08:00
- name : install dependencies
package :
name : parted
state : present
2017-09-15 06:48:53 +08:00
when :
- not containerized_deployment
2018-04-11 23:15:29 +08:00
- ansible_os_family != 'ClearLinux'
2018-08-10 20:16:30 +08:00
- name : include_tasks common.yml
include_tasks : common.yml
2014-03-04 02:08:51 +08:00
2017-09-15 06:48:53 +08:00
- name : include ceph_disk_cli_options_facts.yml
2018-08-21 22:23:35 +08:00
include_tasks : ceph_disk_cli_options_facts.yml
2017-07-25 23:54:26 +08:00
2017-11-14 18:58:38 +08:00
- name : include build_devices.yml
2018-08-21 22:23:35 +08:00
include_tasks : build_devices.yml
2017-09-28 06:17:12 +08:00
2018-04-13 22:36:43 +08:00
- name : read information about the devices
parted :
device : "{{ item }}"
unit : MiB
2017-09-28 06:17:12 +08:00
register : parted_results
2018-04-13 22:36:43 +08:00
with_items : "{{ devices }}"
2017-07-25 23:54:26 +08:00
2017-11-18 00:32:23 +08:00
- name : include check_gpt.yml
2018-08-21 22:23:35 +08:00
include_tasks : check_gpt.yml
2018-05-16 17:58:31 +08:00
when :
- osd_scenario != 'lvm'
2017-11-18 00:32:23 +08:00
2018-08-10 20:16:30 +08:00
- name : include_tasks scenarios/collocated.yml
include_tasks : scenarios/collocated.yml
2016-04-01 18:57:58 +08:00
when :
2017-07-27 23:05:59 +08:00
- osd_scenario == 'collocated'
2014-03-04 02:08:51 +08:00
2018-08-10 20:16:30 +08:00
- name : include_tasks scenarios/non-collocated.yml
include_tasks : scenarios/non-collocated.yml
2016-04-01 18:57:58 +08:00
when :
2017-09-28 06:17:12 +08:00
- not osd_auto_discovery
2017-07-27 23:05:59 +08:00
- osd_scenario == 'non-collocated'
2016-07-19 23:53:21 +08:00
2018-08-10 20:16:30 +08:00
- name : include_tasks scenarios/lvm.yml
include_tasks : scenarios/lvm.yml
2017-07-19 23:05:42 +08:00
when :
2017-08-03 23:08:34 +08:00
- osd_scenario == 'lvm'
2018-08-09 23:40:16 +08:00
- lvm_volumes|length > 0
2018-07-09 22:58:35 +08:00
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static : False
2018-08-04 00:15:58 +08:00
2018-08-10 20:16:30 +08:00
- name : include_tasks scenarios/lvm-batch.yml
include_tasks : scenarios/lvm-batch.yml
2018-08-04 00:15:58 +08:00
when :
- osd_scenario == 'lvm'
2018-08-09 23:40:16 +08:00
- devices|length > 0
2018-07-09 22:58:35 +08:00
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static : False
2017-07-19 23:05:42 +08:00
2018-08-10 20:16:30 +08:00
- name : include_tasks activate_osds.yml
include_tasks : activate_osds.yml
2017-09-13 05:49:11 +08:00
when :
- not containerized_deployment
2018-05-16 17:58:31 +08:00
- osd_scenario != 'lvm'
2017-09-13 05:49:11 +08:00
2018-08-10 20:16:30 +08:00
- name : include_tasks start_osds.yml
include_tasks : start_osds.yml
2017-07-26 05:48:13 +08:00
when :
- not containerized_deployment
2018-05-16 17:58:31 +08:00
- osd_scenario != 'lvm'
2017-07-26 05:48:13 +08:00
2018-08-10 20:16:30 +08:00
- name : include_tasks docker/main.yml
include_tasks : docker/main.yml
2017-09-15 06:48:53 +08:00
when :
- containerized_deployment
2018-05-22 22:41:40 +08:00
2018-06-01 21:11:21 +08:00
- 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 :
2018-09-27 22:31:22 +08:00
- not add_osd|default(False)
2018-06-09 02:03:00 +08:00
- openstack_config
2018-06-01 21:11:21 +08:00
- 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 :
2018-09-27 22:31:22 +08:00
- not add_osd|default(False)
2018-06-01 21:11:21 +08:00
- openstack_keys_tmp is defined
2018-05-22 22:41:40 +08:00
# Create the pools listed in openstack_pools
- name : include openstack_config.yml
2018-08-21 22:23:35 +08:00
include_tasks : openstack_config.yml
2018-05-22 22:41:40 +08:00
when :
2018-09-27 22:31:22 +08:00
- not add_osd|default(False)
2018-05-22 22:41:40 +08:00
- openstack_config
2018-05-23 11:07:38 +08:00
- inventory_hostname == groups[osd_group_name] | last