ansible-doc added a new required element and broke changelog generation
ansible-doc should probably be using subcommands for its exclusive_options...
This commit is contained in:
parent
673c9a3ee2
commit
32f264d508
1 changed files with 4 additions and 3 deletions
|
@ -26,7 +26,7 @@ except ImportError:
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
from ansible.module_utils.six import string_types
|
from ansible.module_utils.six import string_types
|
||||||
from ansible.module_utils._text import to_bytes
|
from ansible.module_utils._text import to_bytes, to_text
|
||||||
|
|
||||||
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||||
CHANGELOG_DIR = os.path.join(BASE_DIR, 'changelogs')
|
CHANGELOG_DIR = os.path.join(BASE_DIR, 'changelogs')
|
||||||
|
@ -180,8 +180,9 @@ def load_plugins(version, force_reload):
|
||||||
plugins_data['plugins'] = {}
|
plugins_data['plugins'] = {}
|
||||||
|
|
||||||
for plugin_type in C.DOCUMENTABLE_PLUGINS:
|
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'),
|
output = subprocess.check_output([os.path.join(BASE_DIR, 'bin', 'ansible-doc'),
|
||||||
'--json', '-t', plugin_type]))
|
'--json', '--metadata-dump', '-t', plugin_type])
|
||||||
|
plugins_data['plugins'][plugin_type] = json.loads(to_text(output))
|
||||||
|
|
||||||
# remove empty namespaces from plugins
|
# remove empty namespaces from plugins
|
||||||
for section in plugins_data['plugins'].values():
|
for section in plugins_data['plugins'].values():
|
||||||
|
|
Loading…
Reference in a new issue