From d6ba1d1d4ece92f1e6e985e666b963d02b308c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 27 Jun 2017 11:47:02 +0200 Subject: [PATCH] mon: fix openstack key creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Somehow the shell module will return an error if the command line is not next to it. Plus fixed the import with the right path. Signed-off-by: Sébastien Han --- roles/ceph-mon/tasks/openstack_config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/ceph-mon/tasks/openstack_config.yml b/roles/ceph-mon/tasks/openstack_config.yml index bfc1b446b..c4dc9b946 100644 --- a/roles/ceph-mon/tasks/openstack_config.yml +++ b/roles/ceph-mon/tasks/openstack_config.yml @@ -9,8 +9,7 @@ # A future version could use "--caps CAPSFILE" # which will set all of capabilities associated with a given key, for all subsystems - name: create openstack key(s) - shell: | - "{{ docker_exec_cmd }} ceph-authtool -C /etc/ceph/{{ cluster }}.{{ item.name }}.keyring --name {{ item.name }} --add-key {{ item.key }} --cap {{ item.mon_cap }} --cap {{ item.osd_cap }}" + shell: "{{ docker_exec_cmd }} ceph-authtool -C /etc/ceph/{{ cluster }}.{{ item.name }}.keyring --name {{ item.name }} --add-key {{ item.key }} --cap {{ item.mon_cap }} --cap {{ item.osd_cap }}" args: creates: "/etc/ceph/{{ cluster }}.{{ item.name }}.keyring" with_items: "{{ openstack_keys }}" @@ -25,7 +24,7 @@ register: openstack_key_exist - name: add openstack key(s) to ceph - command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} auth import -i {{ item.0.name }}.keyring" + command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} auth import -i /etc/ceph/{{ cluster }}.{{ item.0.name }}.keyring" changed_when: false with_together: - "{{ openstack_keys }}"