]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon: replace `command` task by `copy`
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 24 Nov 2020 11:56:04 +0000 (12:56 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 25 Nov 2020 08:34:44 +0000 (09:34 +0100)
We can achieve this task using `copy` module.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-mon/tasks/deploy_monitors.yml

index c7611d36357d068561acc182156ade0956f47534..607435a12a3dfeed89a14d8eb0909129c46ed486 100644 (file)
     CEPH_CONTAINER_BINARY: "{{ container_binary }}"
 
 - name: copy the initial key in /etc/ceph (for containers)
-  command: >
-    cp /var/lib/ceph/tmp/{{ cluster }}.mon..keyring
-       /etc/ceph/{{ cluster }}.mon.keyring
-  changed_when: false
+  copy:
+    src: /var/lib/ceph/tmp/{{ cluster }}.mon..keyring
+    dest: /etc/ceph/{{ cluster }}.mon.keyring
+    remote_src: true
   when: containerized_deployment | bool
 
 - name: create monitor directory