From c7950d5539fd90a1e6613213c29ccac12501320d Mon Sep 17 00:00:00 2001 From: Kevin Coakley Date: Thu, 8 Aug 2019 15:32:38 -0700 Subject: [PATCH] ceph-config: Set changed_when to false on fact gathering statements 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 (cherry picked from commit e11cbbbcb1f4c9ef45546b94d571a6e1ba7d7678) --- roles/ceph-config/tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/ceph-config/tasks/main.yml b/roles/ceph-config/tasks/main.yml index 692b60eef..0a1c7cb1d 100644 --- a/roles/ceph-config/tasks/main.yml +++ b/roles/ceph-config/tasks/main.yml @@ -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