]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch: copy initial mon keyring
authorSébastien Han <seb@redhat.com>
Wed, 3 Oct 2018 11:39:35 +0000 (13:39 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 15 Oct 2018 11:59:21 +0000 (13:59 +0200)
We need to copy this key into /etc/ceph so when ceph-docker-common runs
it can fetch it to the ansible server. Previously the task wasn't not
failing because `fail_on_missing` was False before 2.5, so now it's True
hence the failure.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit bae0f41705e4ca25492a7ff0169490331b897874)

infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index aa0c6d60d3cc9cf88b3e94e7ba046b6447b1d714..d11ef0693cae749d954e447efa4e74e80fc8fd78 100644 (file)
       failed_when: false
       when: ldb_files.rc == 0
 
+    - name: copy mon initial keyring in /etc/ceph to satisfy fetch config task in ceph-docker-common
+      command: cp /var/lib/ceph/mon/{{ cluster }}-{{ ansible_hostname }}/keyring /etc/ceph/{{ cluster }}.mon.keyring
+      args:
+        creates: /etc/ceph/{{ cluster }}.mon.keyring
+      changed_when: false
+      failed_when: false
+
   roles:
     - ceph-defaults
     - ceph-docker-common