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 <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2020-04-13 14:46:36 -05:00
parent a7dd84775c
commit 02a9baa9f7
No known key found for this signature in database
GPG Key ID: CE94BD890A47B20A
1 changed files with 6 additions and 0 deletions

View File

@ -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(