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 <kcoakley@sdsc.edu>
(cherry picked from commit e11cbbbcb1)
pull/4380/head
Kevin Coakley 2019-08-08 15:32:38 -07:00 committed by Guillaume Abrioux
parent 3e17c458d0
commit c7950d5539
1 changed files with 2 additions and 0 deletions

View 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