diff --git a/.gitmodules b/.gitmodules index 516658d..54020ea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -271,15 +271,20 @@ [submodule "docs/ansible/roles/ansible-resources"] path = docs/ansible/roles/ansible-resources url = https://github.com/debops/ansible-resources + ignore = untracked [submodule "docs/ansible/roles/ansible-slapd"] path = docs/ansible/roles/ansible-slapd url = https://github.com/debops/ansible-slapd + ignore = untracked [submodule "docs/ansible/roles/ansible-ruby"] path = docs/ansible/roles/ansible-ruby url = https://github.com/debops/ansible-ruby + ignore = untracked [submodule "docs/ansible/roles/ansible-golang"] path = docs/ansible/roles/ansible-golang url = https://github.com/debops/ansible-golang + ignore = untracked [submodule "docs/ansible/roles/ansible-nodejs"] path = docs/ansible/roles/ansible-nodejs url = https://github.com/debops/ansible-nodejs + ignore = untracked diff --git a/docs/conf.py b/docs/conf.py index 9e92bd8..2728f16 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,12 +18,13 @@ # Generate documentation on the fly based on Ansible default variables import yaml2rst -try: - for element in os.listdir('ansible/roles'): - if os.path.isdir('ansible/roles/' + element): - yaml2rst.convert_file('ansible/roles/' + element + '/defaults/main.yml', 'ansible/roles/' + element + '/docs/defaults.rst') -except: - pass +for element in os.listdir('ansible/roles'): + if os.path.isdir('ansible/roles/' + element): + yaml2rst.convert_file( + 'ansible/roles/' + element + '/defaults/main.yml', + 'ansible/roles/' + element + '/docs/defaults.rst', + strip_regex=r'\s*(:?\[{3}|\]{3})\d?$', + ) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/docs/requirements.txt b/docs/requirements.txt index 1a9433c..298d806 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,3 @@ -yaml2rst +## Install unreleased develop version until htgoebel makes a release. +# yaml2rst +https://github.com/ypid/yaml2rst/archive/feature/expose-strip_regex.zip