f3eeb2fa15
Deploy necessary configs and keyrings for multiple ceph cluters. Specifically, the intent is to enable multiple backends for cinder that can be accessed by compute nodes. This change will allow automatic retrieval of ceph.conf and client keyrings from multiple ceph clusters. Additionally, libvirt ceph client secrets will be created to support attaching volumes to instances from multiple ceph clusters. Change-Id: Icee061b35f374955154a3dd703444b94da0117da
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
---
|
|
# Copyright 2016, Walmart Stores, 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: Get extra ceph.conf files
|
|
shell: "scp {{ item.mon_host }}:/etc/ceph/ceph.conf {{ item.src }}"
|
|
delegate_to: localhost
|
|
with_items: "{{ ceph_extra_confs }}"
|
|
when:
|
|
- item.mon_host is defined
|
|
- item.src is defined
|
|
tags:
|
|
- ceph-config-create-config
|
|
- ceph-config-extra
|
|
|
|
- name: Create extra ceph.conf files
|
|
copy:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify:
|
|
- Restart os services
|
|
with_items: "{{ ceph_extra_confs }}"
|
|
when:
|
|
- item.src is defined
|
|
- item.dest is defined
|
|
tags:
|
|
- ceph-config-create-config
|
|
- ceph-config-extra
|
|
|
|
- name: Add keyring section to extra ceph.conf files
|
|
ini_file:
|
|
dest: "{{ item.dest }}"
|
|
section: "client.{{ item.client_name }}"
|
|
option: keyring
|
|
value: "{{ item.keyring_dest }}"
|
|
with_items: "{{ ceph_extra_confs }}"
|
|
when:
|
|
- item.src is defined
|
|
- item.dest is defined
|
|
- item.keyring_dest is defined
|
|
- item.client_name is defined
|