Created
February 5, 2020 22:02
-
-
Save bcoca/f91264104731a9aa149250d17f895081 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/plugins/inventory/nmap.py b/lib/ansible/plugins/inventory/nmap.py | |
index d2c54fe84e..71fd149988 100644 | |
--- a/lib/ansible/plugins/inventory/nmap.py | |
+++ b/lib/ansible/plugins/inventory/nmap.py | |
@@ -113,6 +113,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): | |
cmd.append(self._options['address']) | |
try: | |
# execute | |
+ display.debug("Running %s" % cmd) | |
p = Popen(cmd, stdout=PIPE, stderr=PIPE) | |
stdout, stderr = p.communicate() | |
if p.returncode != 0: | |
@@ -125,6 +126,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): | |
try: | |
t_stdout = to_text(stdout, errors='surrogate_or_strict') | |
+ display.debug("result: \n%s" % t_stdout) | |
except UnicodeError as e: | |
raise AnsibleParserError('Invalid (non unicode) input returned: %s' % to_native(e)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment