openstack-ansible/playbooks/roles/ceph_client/tasks/ceph_config.yml
Hugh Saunders f7edf6d4a9 Use dict args for ceph_config slurp
Very minor style change, slurp was added with string args (slurp src=)
This patch converts that to using dictionary style args.

Change-Id: I6290d7c993aa561e1b1d2864ebc2884be41f9330
Implements: blueprint ceph-block-devices
2015-08-24 21:11:50 +00:00

62 lines
1.7 KiB
YAML

---
# Copyright 2015, Serge van Ginderachter <serge@vanginderachter.be>
#
# 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: Provide ceph configuration directory
file:
dest: /etc/ceph
state: directory
owner: root
group: root
mode: 0755
tags:
- ceph-config-create-dir
- name: Get ceph.conf and store contents when ceph_conf_file is not defined
slurp:
src: /etc/ceph/ceph.conf
register: ceph_conf_content_mon
delegate_to: '{{ ceph_mon_host }}'
changed_when: false
when: ceph_conf_file is not defined
tags:
- ceph-config-get-config
- name: Register ceph_conf fact when ceph_conf_file is not defined
set_fact:
ceph_conf: "{{ ceph_conf_content_mon.content | b64decode }}"
when: ceph_conf_file is not defined
tags:
- ceph-config-get-config
- name: Register ceph_conf fact when ceph_conf_file is defined
set_fact:
ceph_conf: "{{ ceph_conf_file }}"
when: ceph_conf_file is defined
tags:
- ceph-config-get-config
- name: Create ceph.conf from mon host
copy:
content: '{{ ceph_conf }}'
dest: /etc/ceph/ceph.conf
owner: root
group: root
mode: 0644
notify:
- Restart os services
tags:
- ceph-config-create-config