From cda40100247a24374581d7f1ef769474151f0c4f Mon Sep 17 00:00:00 2001 From: Simon Dodsley Date: Wed, 26 Dec 2018 10:14:20 -0500 Subject: [PATCH] Fix bad placement of array variable (#50256) --- lib/ansible/modules/storage/purestorage/purefa_host.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/storage/purestorage/purefa_host.py b/lib/ansible/modules/storage/purestorage/purefa_host.py index 07510a6ecb..69f85f095f 100644 --- a/lib/ansible/modules/storage/purestorage/purefa_host.py +++ b/lib/ansible/modules/storage/purestorage/purefa_host.py @@ -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']))