114 lines
3.1 KiB
YAML
114 lines
3.1 KiB
YAML
---
|
|
# Copyright 2021 Red Hat, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
- name: Deploy Ceph with cephadm
|
|
hosts: ceph_mon[0]
|
|
tasks:
|
|
- name: Satisfy Ceph prerequisites
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: pre
|
|
|
|
- name: Bootstrap Ceph
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: bootstrap
|
|
when:
|
|
- not tripleo_cephadm_deployed_ceph
|
|
|
|
- name: Apply ceph_conf_overrides on update
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: apply_ceph_conf_overrides
|
|
when:
|
|
- tripleo_cephadm_apply_ceph_conf_overrides_on_update
|
|
|
|
- name: Apply Ceph spec
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: apply_spec
|
|
when:
|
|
- not tripleo_cephadm_spec_on_bootstrap
|
|
- not tripleo_cephadm_deployed_ceph
|
|
|
|
- name: Set crush rules if provided
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: crush_rules
|
|
when:
|
|
- tripleo_cephadm_crush_rules | length > 0
|
|
|
|
- name: Create Pools
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: pools
|
|
|
|
- name: Config RGW
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: rgw
|
|
|
|
- name: Config MDS and Ganesha daemons
|
|
block:
|
|
- name: Config MDS
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: mds
|
|
|
|
- name: Config Ganesha
|
|
include_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: nfs
|
|
when:
|
|
- groups['ceph_nfs'] | default([]) | length > 0
|
|
when:
|
|
- cephfs_data_pool is defined
|
|
- cephfs_metadata_pool is defined
|
|
|
|
- name: Configure Monitoring Stack
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: monitoring
|
|
|
|
- name: Create Keys
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: keys
|
|
|
|
- name: Configure RBD Mirror
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: rbd_mirror
|
|
|
|
- name: Export configuration for tripleo_ceph_client
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: export
|
|
|
|
- name: Show the Ceph cluster status
|
|
import_role:
|
|
name: tripleo_cephadm
|
|
tasks_from: post
|
|
|
|
- name: Distribute the admin keyring
|
|
hosts: ceph_mon
|
|
tasks:
|
|
- name: Distribute the admin keyring
|
|
import_role:
|
|
name: tripleo_ceph_distribute_keys
|
|
vars:
|
|
tripleo_ceph_distribute_keys_config_home: "{{ tripleo_cephadm_config_home | default('/etc/ceph') }}"
|
|
tripleo_ceph_distribute_keys_cluster: "{{ tripleo_cephadm_cluster | default('ceph') }}"
|