mirror of https://github.com/ceph/ceph-ansible.git
85 lines
2.4 KiB
YAML
85 lines
2.4 KiB
YAML
---
|
|
- name: include_tasks system_tuning.yml
|
|
include_tasks: system_tuning.yml
|
|
|
|
- name: install dependencies
|
|
package:
|
|
name: parted
|
|
state: present
|
|
register: result
|
|
until: result is succeeded
|
|
when:
|
|
- not containerized_deployment | bool
|
|
- ansible_os_family != 'ClearLinux'
|
|
|
|
- name: install numactl when needed
|
|
package:
|
|
name: numactl
|
|
register: result
|
|
until: result is succeeded
|
|
when:
|
|
- containerized_deployment | bool
|
|
- ceph_osd_numactl_opts != ""
|
|
tags: with_pkg
|
|
|
|
- name: install lvm2
|
|
package:
|
|
name: lvm2
|
|
register: result
|
|
until: result is succeeded
|
|
when: not is_atomic | bool
|
|
tags: with_pkg
|
|
|
|
- name: include_tasks common.yml
|
|
include_tasks: common.yml
|
|
|
|
- name: include container_options_facts.yml
|
|
include_tasks: container_options_facts.yml
|
|
|
|
- name: read information about the devices
|
|
parted:
|
|
device: "{{ item }}"
|
|
unit: MiB
|
|
register: parted_results
|
|
with_items: "{{ devices }}"
|
|
|
|
- name: include_tasks scenarios/lvm.yml
|
|
include_tasks: scenarios/lvm.yml
|
|
when:
|
|
- lvm_volumes|length > 0
|
|
- not rolling_update|default(False) | bool
|
|
|
|
- name: include_tasks scenarios/lvm-batch.yml
|
|
include_tasks: scenarios/lvm-batch.yml
|
|
when:
|
|
- devices|length > 0
|
|
- not rolling_update|default(False) | bool
|
|
|
|
- name: include_tasks start_osds.yml
|
|
include_tasks: start_osds.yml
|
|
|
|
- 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:
|
|
- not add_osd|default(False) | bool
|
|
- openstack_config | bool
|
|
- 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:
|
|
- not add_osd|default(False) | bool
|
|
- openstack_keys_tmp is defined
|
|
|
|
# Create the pools listed in openstack_pools
|
|
- name: include openstack_config.yml
|
|
include_tasks: openstack_config.yml
|
|
when:
|
|
- not add_osd|default(False) | bool
|
|
- openstack_config | bool
|
|
- inventory_hostname == groups[osd_group_name] | last
|