1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix bad placement of array variable (#50256)

This commit is contained in:
Simon Dodsley 2018-12-26 10:14:20 -05:00 committed by John R Barker
parent 04e2a94687
commit cda4010024

View file

@ -329,12 +329,12 @@ def main():
if not HAS_PURESTORAGE:
module.fail_json(msg='purestorage sdk is required for this module in host')
array = get_system(module)
api_version = array._list_available_rest_versions()
if module.params['nqn'] is not None and NVMEF_API_VERSION not in api_version:
module.fail_json(msg='NVMeF protocol not supported. Please upgrade your array.')
state = module.params['state']
protocol = module.params['protocol']
array = get_system(module)
host = get_host(module, array)
if module.params['lun'] and not 1 <= module.params['lun'] <= 4095:
module.fail_json(msg='LUN ID of {0} is out of range (1 to 4095)'.format(module.params['lun']))