]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
rolling_update: default ceph json output to empty dict v3.2.0rc5
authorSébastien Han <seb@redhat.com>
Wed, 28 Nov 2018 23:27:49 +0000 (00:27 +0100)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Thu, 29 Nov 2018 01:49:05 +0000 (01:49 +0000)
commit2cea33f7fc4bf59eaa249ca26ba326105e392402
treeb311acbf1a27d641a4b758bc64c1a2652e5b7ffb
parent316e49c6d7738c55e3152edbd23e0846f206b510
rolling_update: default ceph json output to empty dict

So we can avoid the following failure:

The conditional check 'hostvars[mon_host]['ansible_hostname'] in (ceph_health_raw.stdout | from_json)["quorum_names"] or hostvars[mon_host]['ansible_fqdn'] in (ceph_health_raw.stdout | from_json)["quorum_names"]
' failed. The error was: No JSON object could be decoded

We just need to set a default, the next iteration will have a more
complete json since the command won't fail.

Signed-off-by: Sébastien Han <seb@redhat.com>
infrastructure-playbooks/rolling_update.yml