]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
Do not pass NoneType as argument to ceph_crush_rule
authorDmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
Wed, 25 Oct 2023 11:47:19 +0000 (13:47 +0200)
committerTeoman ONAY <tonay@redhat.com>
Wed, 6 Dec 2023 18:13:39 +0000 (19:13 +0100)
commitb6102975549d8f870b0c20a01edda59d6ceac422
tree39e0d68444ee751c93f6f114ccf84467172b2d0b
parent490ca79ccc5b1cf7270032a70be41500578f3ae8
Do not pass NoneType as argument to ceph_crush_rule

With ansible-core 2.15 it is not possible to pass argument of unexpected
type, as otherwise module will fail with:
`'None' is not a string and conversion is not allowed`

With that we want to only get all existing crush rules, so we can simply
supply an empty string as a name argument, which would satisfy
requirements and have same behaviour for previous ansible versions.

Alternative approach would be to stop making `name` as a required
argument to the module and use empty string as default value
when info state is used.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
library/ceph_crush_rule.py
roles/ceph-facts/tasks/get_def_crush_rule_name.yml
tests/library/test_ceph_crush_rule.py