mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Validate and reject if csr_path is not supplied when provider is not assertonly (#41385)
This commit is contained in:
parent
20092786cf
commit
9121f2a4c9
1 changed files with 3 additions and 0 deletions
|
@ -1038,6 +1038,9 @@ def main():
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
module.fail_json(msg='You need to have PyOpenSSL>=0.15')
|
module.fail_json(msg='You need to have PyOpenSSL>=0.15')
|
||||||
|
|
||||||
|
if module.params['provider'] != 'assertonly' and module.params['csr_path'] is None:
|
||||||
|
module.fail_json(msg='csr_path is required when provider is not assertonly')
|
||||||
|
|
||||||
base_dir = os.path.dirname(module.params['path'])
|
base_dir = os.path.dirname(module.params['path'])
|
||||||
if not os.path.isdir(base_dir):
|
if not os.path.isdir(base_dir):
|
||||||
module.fail_json(
|
module.fail_json(
|
||||||
|
|
Loading…
Reference in a new issue