added timestamps to ios_command module (#50323)

ios_command module now returns timestamps field, which shows command execution time
This commit is contained in:
vaneuk
2019-01-31 15:41:53 +03:00
committed by Sumit Jaiswal
parent 8719866ae8
commit 2a432a093b
4 changed files with 17 additions and 6 deletions

View File

@@ -198,7 +198,7 @@ def main():
match = module.params['match']
while retries > 0:
responses = run_commands(module, commands)
responses, timestamps = run_commands(module, commands, return_timestamps=True)
for item in list(conditionals):
if item(responses):
@@ -221,6 +221,7 @@ def main():
result.update({
'stdout': responses,
'stdout_lines': list(to_lines(responses)),
'timestamps': timestamps
})
module.exit_json(**result)