mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
fixes to ansible-doc (#47682)
fixes to ansible-doc - change json to always be type dependent - change changelog generation to loop over the options - warn about ignoring module path
This commit is contained in:
@@ -24,6 +24,8 @@ try:
|
||||
except ImportError:
|
||||
argcomplete = None
|
||||
|
||||
from ansible import constants as C
|
||||
|
||||
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
CHANGELOG_DIR = os.path.join(BASE_DIR, 'changelogs')
|
||||
CONFIG_PATH = os.path.join(CHANGELOG_DIR, 'config.yaml')
|
||||
@@ -173,7 +175,9 @@ def load_plugins(version, force_reload):
|
||||
LOGGER.info('refreshing plugin cache')
|
||||
|
||||
plugins_data['version'] = version
|
||||
plugins_data['plugins'] = json.loads(subprocess.check_output([os.path.join(BASE_DIR, 'bin', 'ansible-doc'), '--json']))
|
||||
for plugin_type in C.DOCUMENTABLE_PLUGINS:
|
||||
plugins_data['plugins'][plugin_type] = json.loads(subprocess.check_output([os.path.join(BASE_DIR, 'bin', 'ansible-doc'),
|
||||
'--json', '-t', plugin_type]))
|
||||
|
||||
# remove empty namespaces from plugins
|
||||
for section in plugins_data['plugins'].values():
|
||||
|
||||
Reference in New Issue
Block a user