updated as per fb
This commit is contained in:
parent
161b868e0f
commit
5280ae917c
1 changed files with 7 additions and 2 deletions
|
@ -126,8 +126,13 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
host = None
|
||||
ip = None
|
||||
ports = []
|
||||
for line in stdout.splitlines():
|
||||
line = to_text(line)
|
||||
|
||||
try:
|
||||
t_stdout = to_text(stdout, errors='surrogate_or_strict')
|
||||
except UnicodeError as e:
|
||||
raise AnsibleParserError('Invalid (non unicode) input returned: %s' % to_native(e))
|
||||
|
||||
for line in t_stdout.splitlines():
|
||||
hits = self.find_host.match(line)
|
||||
if hits:
|
||||
if host is not None:
|
||||
|
|
Loading…
Reference in a new issue