From: Sébastien Han Date: Tue, 27 Jun 2017 09:47:02 +0000 (+0200) Subject: mon: fix openstack key creation X-Git-Tag: v2.3.0rc2~17^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d6ba1d1d4ece92f1e6e985e666b963d02b308c0c;p=ceph-ansible.git mon: fix openstack key creation 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 --- 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 }}"