]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rbd: fix bug when trying to fetch key
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 5 Oct 2017 20:25:34 +0000 (22:25 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 6 Oct 2017 09:34:29 +0000 (11:34 +0200)
With jewel, `bootstrap_rbd_keyring` is not set because of this condition:

```
when:
  - ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous
```

Therefore, the task `try to fetch ceph config and keys` will fail.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml

index fabe5d6d67ddd9af035bd8cd3ff295633c97a5b7..581087db3a3ceff979b6cc662789bb329dc87eba 100644 (file)
@@ -9,7 +9,7 @@
   set_fact:
     ceph_config_keys:
       - /etc/ceph/{{ cluster }}.client.admin.keyring
-      - "{{ bootstrap_rbd_keyring | default([]) }}"
+      - "{{ bootstrap_rbd_keyring | default('') }}"
 
 - name: stat for ceph config and keys
   local_action: stat path={{ fetch_directory }}/{{ fsid }}/{{ item }}
@@ -19,6 +19,7 @@
   failed_when: false
   always_run: true
   register: statconfig
+  when: "item | length > 0"
 
 - name: try to fetch ceph config and keys
   copy:
@@ -32,6 +33,7 @@
     - "{{ ceph_config_keys }}"
     - "{{ statconfig.results }}"
   when:
+    - not item.1.get('skipped')
     - item.1.stat.exists == true
 
 - name: set selinux permissions