[cloud aws_s3] Enforce required parameters for the various aws_s3 modes (#36767)
[cloud aws_s3] Most modes require `object` parameter, and this is easy to get wrong (e.g. through confusion with the `dest` parameter). As it's as easy to enforce, let's do that.
This commit is contained in:
parent
836d7a42a4
commit
aa1e491244
1 changed files with 4 additions and 1 deletions
|
@ -636,7 +636,10 @@ def main():
|
|||
module = AnsibleModule(
|
||||
argument_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
required_if=[('mode', 'put', ('src',))],
|
||||
required_if=[['mode', 'put', ['src', 'object']],
|
||||
['mode', 'get', ['dest', 'object']],
|
||||
['mode', 'getstr', ['object']],
|
||||
['mode', 'geturl', ['object']]],
|
||||
)
|
||||
|
||||
if module._name == 's3':
|
||||
|
|
Loading…
Reference in a new issue