From a3d94f7e0dc37020234a4e57cda44d5819c73922 Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Fri, 14 Aug 2015 09:31:34 -0400 Subject: [PATCH] Use slurp to get the content of the ceph.conf file Using slurp will copy the original file entirely, the command strips new lines at the end of the file and ceph complain when \n on the last line is missing. Implements: blueprint ceph-block-devices Change-Id: I321071fad9af332243a86f5840399e3363dfb37a --- playbooks/roles/ceph_client/tasks/ceph_config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playbooks/roles/ceph_client/tasks/ceph_config.yml b/playbooks/roles/ceph_client/tasks/ceph_config.yml index b550d36a9d..e9469ffae6 100644 --- a/playbooks/roles/ceph_client/tasks/ceph_config.yml +++ b/playbooks/roles/ceph_client/tasks/ceph_config.yml @@ -24,8 +24,7 @@ - ceph-config-create-dir - name: Get ceph.conf and store contents when ceph_conf_file is not defined - command: | - cat /etc/ceph/ceph.conf + slurp: src=/etc/ceph/ceph.conf register: ceph_conf_content_mon delegate_to: '{{ ceph_mon_host }}' changed_when: false @@ -35,7 +34,7 @@ - name: Register ceph_conf fact when ceph_conf_file is not defined set_fact: - ceph_conf: "{{ ceph_conf_content_mon.stdout }}" + ceph_conf: "{{ ceph_conf_content_mon.content | b64decode }}" when: ceph_conf_file is not defined tags: - ceph-config-get-config