From 02a9baa9f7db80e1a79aeb4a9cd1484e4ad9fcbc Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 13 Apr 2020 14:46:36 -0500 Subject: [PATCH] Update the auto-doc-plugin to support legacy file names Not all roles are running molecule with the coverage playbook file name. This change ensures that playbook processing is done using both potential names. Change-Id: I95b43c30848b637d303a8927b0865d34df3acb9f Signed-off-by: Kevin Carter --- doc/source/_exts/ansible-autodoc.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/_exts/ansible-autodoc.py b/doc/source/_exts/ansible-autodoc.py index d36ae699d..2fdecafa8 100644 --- a/doc/source/_exts/ansible-autodoc.py +++ b/doc/source/_exts/ansible-autodoc.py @@ -298,6 +298,12 @@ class AnsibleAutoPluginDirective(Directive): test, 'converge.yml' ) + if not os.path.exists(molecule_playbook_path): + molecule_playbook_path = os.path.join( + molecule_path, + test, + 'playbook.yml' + ) with open(molecule_playbook_path) as f: molecule_playbook = DOCYAML.load(f.read()) molecule_section.append(