]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
shrink-osd: various fixes
authorBenoît Knecht <bknecht@protonmail.ch>
Tue, 28 Jul 2020 11:47:26 +0000 (13:47 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 6 Aug 2020 11:10:42 +0000 (13:10 +0200)
commit4052ab29f233f49ac4378d7f084801a122697e2d
treebb1481582c7c1d35db15f0a3f753bcc7b11db4ae
parent7e81ea7d5f460ddb624d0c0349eca94a38ca3d11
shrink-osd: various fixes

This handles missing /etc/ceph/osd, by ensuring we actually found files in
`/etc/ceph/osd` before trying to slurp their content.

This also add a missing `| default(False)` to avoid fowlloing error:

```
fatal: [ceph01]: FAILED! =>
  msg: |-
    The conditional check 'ceph_osd_data_json[item.2]['encrypted'] | bool' failed. The error was: error while evaluating conditional (ceph_osd_data_json[item.2]['encrypted'] | bool): 'dict object' has no attribute 'encrypted'
```

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1862416
Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit fe8fbd3ee2d877c9ca3b08412a8b12f64a111c18)
infrastructure-playbooks/shrink-osd.yml