]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-config: Set changed_when to false on fact gathering statements
authorKevin Coakley <kcoakley@sdsc.edu>
Thu, 8 Aug 2019 22:32:38 +0000 (15:32 -0700)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 22 Aug 2019 18:36:39 +0000 (20:36 +0200)
The "run 'ceph-volume lvm batch --report' to see how many osds are to be
created" and "run 'ceph-volume lvm list' to see how many osds have already been
created" statements only register the lvm_batch_report and lvm_list variables.
Running those ceph-volume commands should never produce a change on the system.
Adding changed_when: false prevents irrelevant change messages from Ansible.

Signed-off-by: Kevin Coakley <kcoakley@sdsc.edu>
(cherry picked from commit e11cbbbcb1f4c9ef45546b94d571a6e1ba7d7678)

roles/ceph-config/tasks/main.yml

index 692b60eef116c388f57e68345578e313704d9506..0a1c7cb1d568dca8b20283bfe217529bc379f039 100644 (file)
@@ -31,6 +31,7 @@
       CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
       CEPH_CONTAINER_BINARY: "{{ container_binary }}"
       PYTHONIOENCODING: utf-8
+    changed_when: false
     when: devices | default([]) | length > 0
 
   - name: set_fact num_osds from the output of 'ceph-volume lvm batch --report'
@@ -49,6 +50,7 @@
       CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
       CEPH_CONTAINER_BINARY: "{{ container_binary }}"
       PYTHONIOENCODING: utf-8
+    changed_when: false
     when:
       - devices | default([]) | length > 0
       - not (lvm_batch_report.stdout | from_json).changed