mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
lvg module bugfix on vg_options patch
When no vg_options are passed to the module, 'vg_options' still exists in the module.params dict with a value of None, so the default empty string in the get method is never used. None cannot be "splitted", which backtraced.
This commit is contained in:
parent
621fcbb9de
commit
2dfee9d0a7
1 changed files with 2 additions and 2 deletions
|
@ -105,7 +105,7 @@ def main():
|
||||||
vg=dict(required=True),
|
vg=dict(required=True),
|
||||||
pvs=dict(type='list'),
|
pvs=dict(type='list'),
|
||||||
pesize=dict(type='int', default=4),
|
pesize=dict(type='int', default=4),
|
||||||
vg_options=dict(),
|
vg_options=dict(default=''),
|
||||||
state=dict(choices=["absent", "present"], default='present'),
|
state=dict(choices=["absent", "present"], default='present'),
|
||||||
force=dict(type='bool', default='no'),
|
force=dict(type='bool', default='no'),
|
||||||
),
|
),
|
||||||
|
@ -116,7 +116,7 @@ def main():
|
||||||
state = module.params['state']
|
state = module.params['state']
|
||||||
force = module.boolean(module.params['force'])
|
force = module.boolean(module.params['force'])
|
||||||
pesize = module.params['pesize']
|
pesize = module.params['pesize']
|
||||||
vgoptions = module.params.get('vg_options', '').split()
|
vgoptions = module.params['vg_options'].split()
|
||||||
|
|
||||||
if module.params['pvs']:
|
if module.params['pvs']:
|
||||||
dev_string = ' '.join(module.params['pvs'])
|
dev_string = ' '.join(module.params['pvs'])
|
||||||
|
|
Loading…
Reference in a new issue