Skip to content
Snippets Groups Projects
Commit 18d90c70 authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

ansible-doc-test: Ignore role if library directory does not exist.

This change make ansible-doc-test skip processing a role if it does
not contain a `library` directory.
parent b32b1b02
Branches
Tags
No related merge requests found
...@@ -124,7 +124,10 @@ def ansible_doc_test(path, verbose): ...@@ -124,7 +124,10 @@ def ansible_doc_test(path, verbose):
# All roles and plugins # All roles and plugins
roles = os.listdir("roles/") roles = os.listdir("roles/")
for _role in roles: for _role in roles:
if not os.path.isdir("roles/%s" % _role): if (
not os.path.isdir("roles/%s" % _role)
or not os.path.isdir("roles/%s/library" % _role)
):
continue continue
modules = os.listdir("roles/%s/library" % _role) modules = os.listdir("roles/%s/library" % _role)
for _module in modules: for _module in modules:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment