|
@@ -1,4 +1,4 @@
|
|
|
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
|
|
|
+# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
|
|
|
#
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
# you may not use this file except in compliance with the License.
|
|
@@ -11,7 +11,6 @@
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
# See the License for the specific language governing permissions and
|
|
|
# limitations under the License.
|
|
|
-
|
|
|
---
|
|
|
|
|
|
# This role will not group the devices if user provides invalid credentials
|
|
@@ -276,7 +275,7 @@
|
|
|
when:
|
|
|
- inventory_hostname not in infiniband_switches.stdout
|
|
|
- not login.failed
|
|
|
- - infinibandswitch_info.json.data['Product name'] == infiniband_search_key
|
|
|
+ - (infinibandswitch_info.json.results is defined and infinibandswitch_info.json.results[0].data['Product name'] == infiniband_search_key) or (infinibandswitch_info.json.data is defined and infinibandswitch_info.json.data['Product name'] == infiniband_search_key)
|
|
|
rescue:
|
|
|
- name: Failed while adding device to ib_inventory
|
|
|
debug:
|