Call description from help by default

This commit is contained in:
Bo Maryniuk 2017-09-12 17:01:19 +02:00
parent 01ba818a63
commit 05244d82fa

View File

@ -222,6 +222,10 @@ def help(module=None, *args):
except Exception as err:
log.error("Error parsing doc section: {0}".format(err))
if not args:
if 'description' in doc:
description = doc.get('description') or ''
del doc['description']
ret['Description'] = description
ret['Available sections on module "{}"'.format(module.__name__.replace('ansible.modules.', ''))] = doc.keys()
else:
for arg in args: