Skip to content

Commit fcf6ff5

Browse files
authored
Merge pull request #1514 from dylan-stella/devel
Fix faulty IP address DNS check
2 parents 160067d + e8ec585 commit fcf6ff5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
bugfixes:
3+
- nb_inventory - Fix AttributeError when `ip_address` is None during DNS name lookup

plugins/inventory/nb_inventory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ def extract_dns_name(self, host):
10371037
)
10381038

10391039
# Don"t assign a host_var for empty dns_name
1040-
if ip_address.get("dns_name") == "":
1040+
if ip_address is None or ip_address.get("dns_name") == "":
10411041
return None
10421042

10431043
return ip_address.get("dns_name")

0 commit comments

Comments
 (0)