|
|
@ -28,7 +28,7 @@ from ansible.compat.six import iteritems
|
|
|
|
|
|
|
|
|
|
|
|
from ansible import constants as C
|
|
|
|
from ansible import constants as C
|
|
|
|
from ansible.errors import AnsibleError, AnsibleOptionsError
|
|
|
|
from ansible.errors import AnsibleError, AnsibleOptionsError
|
|
|
|
from ansible.plugins import module_loader
|
|
|
|
from ansible.plugins import module_loader, action_loader
|
|
|
|
from ansible.cli import CLI
|
|
|
|
from ansible.cli import CLI
|
|
|
|
from ansible.utils import module_docs
|
|
|
|
from ansible.utils import module_docs
|
|
|
|
|
|
|
|
|
|
|
@ -106,6 +106,12 @@ class DocCLI(CLI):
|
|
|
|
|
|
|
|
|
|
|
|
if doc is not None:
|
|
|
|
if doc is not None:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# is there corresponding action plugin?
|
|
|
|
|
|
|
|
if module in action_loader:
|
|
|
|
|
|
|
|
doc['action'] = True
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
doc['action'] = False
|
|
|
|
|
|
|
|
|
|
|
|
all_keys = []
|
|
|
|
all_keys = []
|
|
|
|
for (k,v) in iteritems(doc['options']):
|
|
|
|
for (k,v) in iteritems(doc['options']):
|
|
|
|
all_keys.append(k)
|
|
|
|
all_keys.append(k)
|
|
|
@ -249,6 +255,9 @@ class DocCLI(CLI):
|
|
|
|
if 'deprecated' in doc and doc['deprecated'] is not None and len(doc['deprecated']) > 0:
|
|
|
|
if 'deprecated' in doc and doc['deprecated'] is not None and len(doc['deprecated']) > 0:
|
|
|
|
text.append("DEPRECATED: \n%s\n" % doc['deprecated'])
|
|
|
|
text.append("DEPRECATED: \n%s\n" % doc['deprecated'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if 'action' in doc and doc['action']:
|
|
|
|
|
|
|
|
text.append(" * note: %s\n" % "This module has a corresponding action plugin.")
|
|
|
|
|
|
|
|
|
|
|
|
if 'option_keys' in doc and len(doc['option_keys']) > 0:
|
|
|
|
if 'option_keys' in doc and len(doc['option_keys']) > 0:
|
|
|
|
text.append("Options (= is mandatory):\n")
|
|
|
|
text.append("Options (= is mandatory):\n")
|
|
|
|
|
|
|
|
|
|
|
|