mirror of https://github.com/ceph/ceph-ansible.git
library: fix a bug in ceph_key module
`name` is a mandatory parameter when `state` is either `present` or `absent` or `update` or `info`. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/7431/head
parent
86ab93efbb
commit
855f742486
|
@ -519,6 +519,10 @@ def run_module():
|
|||
user_key = module.params.get('user_key')
|
||||
output_format = module.params.get('output_format')
|
||||
|
||||
# Can't use required_if with 'name' for some reason...
|
||||
if state in ['present', 'absent', 'update', 'info'] and not name:
|
||||
fatal(f'"state" is "{state}" but "name" is not defined.', module)
|
||||
|
||||
changed = False
|
||||
|
||||
result = dict(
|
||||
|
|
Loading…
Reference in New Issue