@ -1286,10 +1286,16 @@ class DocCLI(CLI, RoleMixin):
if ' module ' in item :
text . append ( textwrap . fill ( DocCLI . tty_ify ( ' Module %s ' % item [ ' module ' ] ) ,
limit - 6 , initial_indent = opt_indent [ : - 2 ] + " * " , subsequent_indent = opt_indent ) )
description = item . get ( ' description ' , ' The official documentation on the %s module. ' % item [ ' module ' ] )
text . append ( textwrap . fill ( DocCLI . tty_ify ( description ) , limit - 6 , initial_indent = opt_indent + ' ' , subsequent_indent = opt_indent + ' ' ) )
text . append ( textwrap . fill ( DocCLI . tty_ify ( get_versioned_doclink ( ' modules/ %s _module.html ' % item [ ' module ' ] ) ) ,
limit - 6 , initial_indent = opt_indent + ' ' , subsequent_indent = opt_indent ) )
description = item . get ( ' description ' )
if description is None and item [ ' module ' ] . startswith ( ' ansible.builtin. ' ) :
description = ' The official documentation on the %s module. ' % item [ ' module ' ]
if description is not None :
text . append ( textwrap . fill ( DocCLI . tty_ify ( description ) ,
limit - 6 , initial_indent = opt_indent + ' ' , subsequent_indent = opt_indent + ' ' ) )
if item [ ' module ' ] . startswith ( ' ansible.builtin. ' ) :
relative_url = ' collections/ %s _module.html ' % item [ ' module ' ] . replace ( ' . ' , ' / ' , 2 )
text . append ( textwrap . fill ( DocCLI . tty_ify ( get_versioned_doclink ( relative_url ) ) ,
limit - 6 , initial_indent = opt_indent + ' ' , subsequent_indent = opt_indent ) )
elif ' name ' in item and ' link ' in item and ' description ' in item :
text . append ( textwrap . fill ( DocCLI . tty_ify ( item [ ' name ' ] ) ,
limit - 6 , initial_indent = opt_indent [ : - 2 ] + " * " , subsequent_indent = opt_indent ) )