Replace dev_string to dev_list

This commit is contained in:
Filipe Niero Felisbino 2014-10-06 12:49:20 -03:00
parent 8a4f07eecd
commit 6cfb97a1c8

View file

@ -131,7 +131,6 @@ def main():
vgoptions = module.params['vg_options'].split() vgoptions = module.params['vg_options'].split()
if module.params['pvs']: if module.params['pvs']:
dev_string = ' '.join(module.params['pvs'])
dev_list = module.params['pvs'] dev_list = module.params['pvs']
elif state == 'present': elif state == 'present':
module.fail_json(msg="No physical volumes given.") module.fail_json(msg="No physical volumes given.")
@ -188,7 +187,7 @@ def main():
else: else:
module.fail_json(msg="Creating physical volume '%s' failed" % current_dev, rc=rc, err=err) module.fail_json(msg="Creating physical volume '%s' failed" % current_dev, rc=rc, err=err)
vgcreate_cmd = module.get_bin_path('vgcreate') vgcreate_cmd = module.get_bin_path('vgcreate')
rc,_,err = module.run_command([vgcreate_cmd] + vgoptions + ['-s', str(pesize), vg, dev_string]) rc,_,err = module.run_command([vgcreate_cmd] + vgoptions + ['-s', str(pesize), vg] + dev_list)
if rc == 0: if rc == 0:
changed = True changed = True
else: else: