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
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
2019-05-22 16:02:42 +08:00
|
|
|
- not containerized_deployment | bool
|
2018-04-11 23:15:29 +08:00
|
|
|
- ansible_os_family != 'ClearLinux'
|
|
|
|
|
2019-03-11 22:44:47 +08:00
|
|
|
- name: install numactl when needed
|
|
|
|
package:
|
|
|
|
name: numactl
|
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
|
|
|
when:
|
2019-05-22 16:02:42 +08:00
|
|
|
- containerized_deployment | bool
|
2019-03-11 22:44:47 +08:00
|
|
|
- ceph_osd_numactl_opts != ""
|
2019-04-01 23:46:15 +08:00
|
|
|
tags: with_pkg
|
2019-03-11 22:44:47 +08:00
|
|
|
|
2019-03-21 03:30:46 +08:00
|
|
|
- name: install lvm2
|
|
|
|
package:
|
|
|
|
name: lvm2
|
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2019-05-22 16:02:42 +08:00
|
|
|
when: not is_atomic | bool
|
2019-04-01 23:46:15 +08:00
|
|
|
tags: with_pkg
|
2019-03-21 03:30:46 +08:00
|
|
|
|
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
|
|
|
|
2018-10-03 05:54:57 +08:00
|
|
|
- name: include container_options_facts.yml
|
|
|
|
include_tasks: container_options_facts.yml
|
2017-07-25 23:54:26 +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
|
|
|
|
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:
|
2018-08-09 23:40:16 +08:00
|
|
|
- lvm_volumes|length > 0
|
2019-05-22 16:02:42 +08:00
|
|
|
- not rolling_update|default(False) | bool
|
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:
|
2018-08-09 23:40:16 +08:00
|
|
|
- devices|length > 0
|
2019-05-22 16:02:42 +08:00
|
|
|
- not rolling_update|default(False) | bool
|
2017-07-19 23:05:42 +08:00
|
|
|
|
2018-08-10 20:16:30 +08:00
|
|
|
- name: include_tasks start_osds.yml
|
|
|
|
include_tasks: start_osds.yml
|
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:
|
2019-05-22 16:02:42 +08:00
|
|
|
- not add_osd|default(False) | bool
|
|
|
|
- openstack_config | bool
|
2018-11-01 19:48:59 +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
|
2018-06-01 21:11:21 +08:00
|
|
|
|
|
|
|
- name: set_fact keys - override keys_tmp with keys
|
|
|
|
set_fact:
|
|
|
|
openstack_keys: "{{ openstack_keys_tmp }}"
|
|
|
|
when:
|
2019-05-22 16:02:42 +08:00
|
|
|
- not add_osd|default(False) | bool
|
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:
|
2019-05-22 16:02:42 +08:00
|
|
|
- not add_osd|default(False) | bool
|
|
|
|
- openstack_config | bool
|
2018-05-23 11:07:38 +08:00
|
|
|
- inventory_hostname == groups[osd_group_name] | last
|