diff --git a/.gitmodules b/.gitmodules index 3d0524b..e33bf44 100644 --- a/.gitmodules +++ b/.gitmodules @@ -355,15 +355,20 @@ [submodule "docs/ansible/roles/ansible-users"] path = docs/ansible/roles/ansible-users url = https://github.com/debops/ansible-users + ignore = untracked [submodule "docs/ansible/roles/ansible-elasticsearch"] path = docs/ansible/roles/ansible-elasticsearch url = https://github.com/debops/ansible-elasticsearch + ignore = untracked [submodule "docs/ansible/roles/ansible-gunicorn"] path = docs/ansible/roles/ansible-gunicorn url = https://github.com/debops/ansible-gunicorn + ignore = untracked [submodule "docs/ansible/roles/ansible-netbox"] path = docs/ansible/roles/ansible-netbox url = https://github.com/debops/ansible-netbox + ignore = untracked [submodule "docs/ansible/roles/ansible-dnsmasq"] path = docs/ansible/roles/ansible-dnsmasq url = https://github.com/debops/ansible-dnsmasq + ignore = untracked diff --git a/docs/.gitignore b/docs/.gitignore index d4e11e5..604a2b6 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,2 +1,2 @@ _build - +ansible/roles/includes diff --git a/docs/Makefile b/docs/Makefile index 58d1055..f68a3d1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,11 +7,6 @@ SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter @@ -19,7 +14,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -.PHONY: help clean distclean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext +.PHONY: help help: @echo "Please use \`make ' where is one of" @@ -30,8 +25,10 @@ help: @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" + @echo " epub3 to make an epub3" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @@ -45,7 +42,10 @@ help: @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + @echo " dummy to check syntax errors of document sources" +.PHONY: clean clean: rm -rf $(BUILDDIR)/* @@ -54,7 +54,7 @@ distclean: .PHONY: FORCE_MAKE -prepare: includes/global.rst +prepare: includes/global.rst: \ includes/30gen_ansible_modules.rst \ @@ -64,54 +64,61 @@ includes/global.rst: \ FORCE_MAKE run-parts --list --regex '.*\.rst' includes | grep -v 'global.rst$$' | xargs awk 'FNR==1{print ""}{print}' > "$@" -includes/30gen_ansible_modules.rst: ./bin/gen_ansible_modules_rst_defs +includes/30gen_ansible_modules.rst: ./_bin/gen_ansible_modules_rst_defs "$<" > "$@" -includes/40gen_debops_api.rst: ./bin/gen_rst_defs_using_debops_api +includes/40gen_debops_api.rst: ./_bin/gen_rst_defs_using_debops_api "$<" --debops-api-query v0/roles/debops.json --role-owner 'debops' > "$@" -includes/45gen_debops_contrib_repos.rst: ./bin/gen_rst_defs_using_remote_api +includes/45gen_debops_contrib_repos.rst: ./_bin/gen_rst_defs_using_remote_api "$<" 'github' 'DebOps Contrib' 'debops-contrib' 'orgs' > "$@" -includes/60gen_ypid_repos.rst: ./bin/gen_rst_defs_using_remote_api +includes/60gen_ypid_repos.rst: ./_bin/gen_rst_defs_using_remote_api "$<" 'github' 'ypid' 'ypid' 'users' > "$@" # Run from conf.py .PHONY: linkincludes -linkincludes: bin/linkincludes +linkincludes: _bin/linkincludes "$<" +.PHONY: html html: prepare $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." +.PHONY: dirhtml dirhtml: prepare $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." +.PHONY: singlehtml singlehtml: prepare $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." +.PHONY: pickle pickle: prepare $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." +.PHONY: json json: prepare $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." +.PHONY: htmlhelp htmlhelp: prepare $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." +.PHONY: qthelp qthelp: prepare $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @@ -121,6 +128,16 @@ qthelp: prepare @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/DebOps.qhc" +.PHONY: applehelp +applehelp: prepare + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp devhelp: prepare $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @@ -130,11 +147,19 @@ devhelp: prepare @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/DebOps" @echo "# devhelp" +.PHONY: epub epub: prepare $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." +.PHONY: epub3 +epub3: prepare + $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 + @echo + @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." + +.PHONY: latex latex: prepare $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @@ -142,28 +167,33 @@ latex: prepare @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." +.PHONY: latexpdf latexpdf: prepare $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." +.PHONY: latexpdfja latexpdfja: prepare $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." +.PHONY: text text: prepare $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." +.PHONY: man man: prepare $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." +.PHONY: texinfo texinfo: prepare $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @@ -171,39 +201,58 @@ texinfo: prepare @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." +.PHONY: info info: prepare $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." +.PHONY: gettext gettext: prepare $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." +.PHONY: changes changes: prepare $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." +.PHONY: linkcheck linkcheck: prepare $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." +.PHONY: doctest doctest: prepare $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." +.PHONY: coverage +coverage: prepare + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml xml: prepare $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." +.PHONY: pseudoxml pseudoxml: prepare $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +.PHONY: dummy +dummy: prepare + $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy + @echo + @echo "Build finished. Dummy builder generates no files." diff --git a/docs/bin/gen_ansible_modules_rst_defs b/docs/_bin/gen_ansible_modules_rst_defs similarity index 94% rename from docs/bin/gen_ansible_modules_rst_defs rename to docs/_bin/gen_ansible_modules_rst_defs index 955c149..2e0f2ee 100755 --- a/docs/bin/gen_ansible_modules_rst_defs +++ b/docs/_bin/gen_ansible_modules_rst_defs @@ -7,7 +7,7 @@ set -e echo '.. Ansible modules [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_ansible_modules_rst_defs +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_ansible_modules_rst_defs ' ## dev/testing: `ansible-doc -l` needs to be cached because it is that freaking slow. diff --git a/docs/bin/gen_rst_defs_using_debops_api b/docs/_bin/gen_rst_defs_using_debops_api similarity index 98% rename from docs/bin/gen_rst_defs_using_debops_api rename to docs/_bin/gen_rst_defs_using_debops_api index c73d37b..0f07195 100755 --- a/docs/bin/gen_rst_defs_using_debops_api +++ b/docs/_bin/gen_rst_defs_using_debops_api @@ -5,7 +5,7 @@ __license__ = 'GPL-3.0' __author__ = 'Robin Schneider ' __version__ = '0.1.0' -SCRIPT_URL = 'https://github.com/debops/docs/blob/master/docs/docs/bin/gen_rst_defs_using_debops_api' +SCRIPT_URL = 'https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_rst_defs_using_debops_api' """ Generate URL definitions based on data returned by the DebOps API. diff --git a/docs/bin/gen_rst_defs_using_remote_api b/docs/_bin/gen_rst_defs_using_remote_api similarity index 97% rename from docs/bin/gen_rst_defs_using_remote_api rename to docs/_bin/gen_rst_defs_using_remote_api index 28ba1f3..7893557 100755 --- a/docs/bin/gen_rst_defs_using_remote_api +++ b/docs/_bin/gen_rst_defs_using_remote_api @@ -6,7 +6,7 @@ set -e -SCRIPT_URL='https://github.com/debops/docs/blob/master/docs/docs/bin/gen_rst_defs_using_remote_api' +SCRIPT_URL='https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_rst_defs_using_remote_api' get_defs_by_github_api_call() { ## Ref: https://developer.github.com/v3/repos/#list-user-repositories diff --git a/docs/bin/linkincludes b/docs/_bin/linkincludes similarity index 68% rename from docs/bin/linkincludes rename to docs/_bin/linkincludes index b253a13..22c6e19 100755 --- a/docs/bin/linkincludes +++ b/docs/_bin/linkincludes @@ -19,12 +19,18 @@ do ## ln: invalid option -- 'r' ## The version of ln on Travis does not have --relative :< ln -sf "$DOCS_DIR/includes/global.rst" global.rst + + ## Should not be needed but for some reason when setting up DebOps Contrib, + ## it was needed for CHANGES.rst. + ln -sf "$DOCS_DIR/includes" ../../ + popd 1>/dev/null ## Print for debugging for now. - # 1>/dev/null done +test -d ansible/roles && ln -sf ../../includes/ ansible/roles + ## Seems that this hack is needed for Travis CI. Not sure why. For readthedocs.org it is not needed. -ln -sf docs/includes debops-api/ -ln -sf docs/includes debops-keyring/ -ln -sf docs/includes debops-policy/ +test -d debops-api && ln -sf docs/includes debops-api/ +test -d debops-keyring && ln -sf docs/includes debops-keyring/ +test -d debops-policy && ln -sf docs/includes debops-policy/ diff --git a/docs/bin/prepare_repos_before_sphinx_runs b/docs/_bin/prepare_repos_before_sphinx_runs similarity index 100% rename from docs/bin/prepare_repos_before_sphinx_runs rename to docs/_bin/prepare_repos_before_sphinx_runs diff --git a/docs/bin/sphinx_conf_pre_hook b/docs/_bin/sphinx_conf_pre_hook similarity index 80% rename from docs/bin/sphinx_conf_pre_hook rename to docs/_bin/sphinx_conf_pre_hook index 34be6c8..5414505 100755 --- a/docs/bin/sphinx_conf_pre_hook +++ b/docs/_bin/sphinx_conf_pre_hook @@ -5,5 +5,5 @@ ## Run hook scripts just before Sphinx runs. ## Hook is installed from `conf.py` from Sphinx. -bin/linkincludes -bin/prepare_repos_before_sphinx_runs +_bin/linkincludes +_bin/prepare_repos_before_sphinx_runs diff --git a/docs/_lib/sphinxcontrib/__init__.py b/docs/_lib/sphinxcontrib/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/docs/_lib/sphinxcontrib/__init__.pyc b/docs/_lib/sphinxcontrib/__init__.pyc new file mode 100644 index 0000000..7981d58 Binary files /dev/null and b/docs/_lib/sphinxcontrib/__init__.pyc differ diff --git a/docs/_lib/sphinxcontrib/debops/__init__.py b/docs/_lib/sphinxcontrib/debops/__init__.py new file mode 100644 index 0000000..40a8231 --- /dev/null +++ b/docs/_lib/sphinxcontrib/debops/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from .func import * # pylint: disable=wildcard-import diff --git a/docs/_lib/sphinxcontrib/debops/__init__.pyc b/docs/_lib/sphinxcontrib/debops/__init__.pyc new file mode 100644 index 0000000..b9644c9 Binary files /dev/null and b/docs/_lib/sphinxcontrib/debops/__init__.pyc differ diff --git a/docs/_lib/sphinxcontrib/debops/func.py b/docs/_lib/sphinxcontrib/debops/func.py new file mode 100644 index 0000000..d1449e1 --- /dev/null +++ b/docs/_lib/sphinxcontrib/debops/func.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2016 DebOps Project http://debops.org/ + +import os +import fnmatch +import re +from subprocess import check_output + +import yaml2rst + + +def yaml2rst_role_defaults(dir_path): # NOQA + """Generate documentation on the fly based on Ansible default variables""" + for element in os.listdir(dir_path): + if os.path.isdir(dir_path + element) and element not in ['includes']: + yaml2rst.convert_file( + dir_path + element + '/defaults/main.yml', + dir_path + element + '/docs/defaults.rst', + strip_regex=r'\s*(:?\[{3}|\]{3})\d?$', + yaml_strip_regex=r'^\s{66,67}#\s\]{3}\d?$', + ) + + +# Fix "Edit on GitHub" links ((( +# Jinja2 Support is only basic Jinja2 without all the good stuff from Ansible. So I am not gonna mess with that or try to extend it as in: +# https://stackoverflow.com/questions/36019670/removing-the-edit-on-github-link-when-using-read-the-docs-sphinx-with-readthed +# What I am gonna do instead is just recompute source file to URL map in Python and job done. +# +# git_repo.iter_submodules() fails with "unknown encoding: -----BEGIN PGP SIGNATURE-----" +# +# https://stackoverflow.com/a/21909382 +# import sphinx.application.TemplateBridge + +def find_files(directory, pattern): + for root, dirs, files in os.walk(directory): + for basename in files: + if fnmatch.fnmatch(basename, pattern): + filename = os.path.join(root, basename) + yield filename + + +def get_source_file_to_url_map(start_dir='.', skip_patterns=[]): + source_file_to_url_map = {} + repo_dir_to_url_map = {} + list_of_submod_paths = [] + + cur_dir = os.path.abspath(os.path.dirname(__file__)) + + for submodule_path in check_output(['git', 'submodule', '--quiet', 'foreach', 'pwd']).split('\n'): + if submodule_path.startswith(cur_dir): + submodule_path = submodule_path[len(cur_dir):].lstrip('/') + list_of_submod_paths.append(submodule_path) + + for source_file_name in find_files('.', '*.rst'): + pagename_source_file = source_file_name.lstrip('/.') + + skip = False + for skip_pattern in skip_patterns: + if re.search(skip_pattern, pagename_source_file): + # print(pagename_source_file) + skip = True + break + + if skip: + continue + + dir_path = os.path.dirname(source_file_name) + if len(dir_path) > 2: + dir_path = dir_path.lstrip('/.') + + # Can also contain subdirs in a repo but this optimization should already + # get factor 10 in performance for git Invokation. + if dir_path not in repo_dir_to_url_map: + # git_repo = git.Repo(dir_path) + # repo_dir_to_url_map[dir_path] = git_repo.remotes.origin.url + for remote_line in check_output(['git', '-C', dir_path, 'remote', '-v']).split('\n'): + remote_item = re.split(r'\s', remote_line) + if remote_item[0] == 'origin' and remote_item[2] == '(fetch)': + base_url = remote_item[1] + if base_url.endswith('.git'): + base_url = base_url[:-4] + repo_dir_to_url_map[dir_path] = base_url + # print(repo_dir_to_url_map[dir_path]) + + relative_pagename = pagename_source_file + + if relative_pagename in ['index.rst', 'ansible/roles/index.rst']: + relative_pagename = 'docs/' + relative_pagename + + for submod_path in list_of_submod_paths: + if pagename_source_file.startswith(submod_path + '/'): + relative_pagename = pagename_source_file[len(submod_path):].lstrip('/') + + # Does not work for legacy roles yet. Disabled. + # if re.match(r'docs/copyright(?:\.rst)$', relative_pagename, flags=re.I): + # relative_pagename = 'COPYRIGHT' + + if re.match(r'docs/readme(?:\.rst)$', relative_pagename, flags=re.I): + relative_pagename = 'README.rst' + + if re.match(r'docs/changelog(?:\.rst)$', relative_pagename, flags=re.I): + relative_pagename = 'CHANGES.rst' + + pagename_source_file = re.sub(r'\.rst$', '', pagename_source_file) + print(dir_path) + source_file_to_url_map[pagename_source_file] = { + 'url': repo_dir_to_url_map[dir_path], + 'pagename': relative_pagename, + } + # print('{}: {}'.format(pagename_source_file, source_file_to_url_map[pagename_source_file])) + + # print(source_file_to_url_map) + # import pprint + # pprint.pprint(source_file_to_url_map) + return source_file_to_url_map diff --git a/docs/_lib/sphinxcontrib/debops/func.pyc b/docs/_lib/sphinxcontrib/debops/func.pyc new file mode 100644 index 0000000..f4aa6ff Binary files /dev/null and b/docs/_lib/sphinxcontrib/debops/func.pyc differ diff --git a/docs/conf.py b/docs/conf.py index 1a80018..32dbad9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # DebOps documentation build configuration file -# Copyright (C) 2014-2016 DebOps Project http://debops.org/ +# Copyright (C) 2014-2016 DebOps Project https://debops.org/ # # This file is execfile()d with the current directory set to its # containing dir. @@ -12,157 +12,29 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys -import os -import fnmatch -import re - -# import git - -# Generate documentation on the fly based on Ansible default variables -import yaml2rst - -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?$', - yaml_strip_regex=r'^\s{66,67}#\s\]{3}\d?$', - ) - -from subprocess import call, check_output -call(['bin/sphinx_conf_pre_hook']) - -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'default' - -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# Fix "Edit on GitHub" links ((( -# Jinja2 Support is only basic Jinja2 without all the good stuff from Ansible. So I am not gonna mess with that or try to extend it as in: -# https://stackoverflow.com/questions/36019670/removing-the-edit-on-github-link-when-using-read-the-docs-sphinx-with-readthed -# What I am gonna do instead is just recompute source file to URL map in Python and job done. -# -# git_repo.iter_submodules() fails with "unknown encoding: -----BEGIN PGP SIGNATURE-----" - - -def find_files(directory, pattern): - for root, dirs, files in os.walk(directory): - for basename in files: - if fnmatch.fnmatch(basename, pattern): - filename = os.path.join(root, basename) - yield filename - - -def get_source_file_to_url_map(start_dir='.'): - skip_patterns = [ - r'debops-keyring/docs/entities(?:\.rst)$', # Auto generated. - r'ansible/roles/debops[^/]+$', # Legacy. - ] - - source_file_to_url_map = {} - repo_dir_to_url_map = {} - list_of_submod_paths = [] - - cur_dir = os.path.abspath(os.path.dirname(__file__)) - - for submodule_path in check_output(['git', 'submodule', '--quiet', 'foreach', 'pwd']).split('\n'): - if submodule_path.startswith(cur_dir): - submodule_path = submodule_path[len(cur_dir):].lstrip('/') - list_of_submod_paths.append(submodule_path) - - for source_file_name in find_files('.', '*.rst'): - pagename_source_file = source_file_name.lstrip('/.') - - skip = False - for skip_pattern in skip_patterns: - if re.search(skip_pattern, pagename_source_file): - # print(pagename_source_file) - skip = True - break - - if skip: - continue - - dir_path = os.path.dirname(source_file_name) - if len(dir_path) > 2: - dir_path = dir_path.lstrip('/.') - - # Can also contain subdirs in a repo but this optimization should already - # get factor 10 in performance for git Invokation. - if dir_path not in repo_dir_to_url_map: - # git_repo = git.Repo(dir_path) - # repo_dir_to_url_map[dir_path] = git_repo.remotes.origin.url - for remote_line in check_output(['git', '-C', dir_path, 'remote', '-v']).split('\n'): - remote_item = re.split(r'\s', remote_line) - if remote_item[0] == 'origin' and remote_item[2] == '(fetch)': - base_url = remote_item[1] - if base_url.endswith('.git'): - base_url = base_url[:-4] - repo_dir_to_url_map[dir_path] = base_url - # print(repo_dir_to_url_map[dir_path]) - - relative_pagename = pagename_source_file - - if relative_pagename in ['index.rst', 'ansible/roles/index.rst']: - relative_pagename = 'docs/' + relative_pagename - - for submod_path in list_of_submod_paths: - if pagename_source_file.startswith(submod_path + '/'): - relative_pagename = pagename_source_file[len(submod_path):].lstrip('/') - - # Does not work for legacy roles yet. Disabled. - # if re.match(r'docs/copyright(?:\.rst)$', relative_pagename, flags=re.I): - # relative_pagename = 'COPYRIGHT' - - if re.match(r'docs/readme(?:\.rst)$', relative_pagename, flags=re.I): - relative_pagename = 'README.rst' - - if re.match(r'docs/changelog(?:\.rst)$', relative_pagename, flags=re.I): - relative_pagename = 'CHANGES.rst' - - pagename_source_file = re.sub(r'\.rst$', '', pagename_source_file) - source_file_to_url_map[pagename_source_file] = { - 'url': repo_dir_to_url_map[dir_path], - 'pagename': relative_pagename, - } - # print('{}: {}'.format(pagename_source_file, source_file_to_url_map[pagename_source_file])) - - - # print(source_file_to_url_map) - # import pprint - # pprint.pprint(source_file_to_url_map) - return source_file_to_url_map - -html_context = { - 'display_github': True, # Add 'Edit on Github' link instead of 'View page source' - 'last_updated': True, - 'commit': False, - 'source_file_to_url_map': get_source_file_to_url_map() -} - -# https://stackoverflow.com/a/21909382 -# import sphinx.application.TemplateBridge -# ))) - # 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 # documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys # sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('_lib')) +from sphinxcontrib import debops + +debops.yaml2rst_role_defaults('ansible/roles/') + +from subprocess import call +call(['_bin/sphinx_conf_pre_hook']) + # -- General configuration ------------------------------------------------ suppress_warnings = ['image.nonlocal_uri'] # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -172,18 +44,23 @@ def get_source_file_to_url_map(start_dir='.'): # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -# The suffix of source filenames. +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The encoding of source files. -#source_encoding = 'utf-8-sig' +# +# source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'DebOps' -copyright = u'2014-2016, Maciej Delmanowski, Nick Janetakis, Robin Schneider' +author = u'Maciej Delmanowski, Nick Janetakis, Robin Schneider' +copyright = u'2014-2016, {}'.format(author) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -196,33 +73,44 @@ def get_source_file_to_url_map(start_dir='.'): # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# +# today = '' +# # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path # 'includes/*.rst': https://github.com/debops/docs/issues/144 exclude_patterns = ['_build', 'debops/*.rst', 'debops-playbooks/*.rst', 'ansible/roles/ansible-*/*.rst', 'ansible/roles/ansible-*/docs/parts', '**includes/*.rst', 'debops-api/README.rst', 'debops-api/tests/**.rst', 'debops-policy/README.rst'] # The reST default role (used for this markup: `text`) to use for all # documents. -#default_role = None +# +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' @@ -232,42 +120,73 @@ def get_source_file_to_url_map(start_dir='.'): # for more details. highlight_language = 'YAML' -## TODO: Change later to this when it can handle: -## enabled: '{{ True if (owncloud_database_name != owncloud_database_user) else False }}' +# TODO: Change later to this when it can handle: +# enabled: '{{ True if (owncloud_database_name != owncloud_database_user) else False }}' # highlight_language = 'YAML+Jinja' # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False # -- Options for HTML output ---------------------------------------------- +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +html_context = { + 'display_github': True, # Add 'Edit on Github' link instead of 'View page source' + 'last_updated': True, + 'commit': False, + 'source_file_to_url_map': debops.get_source_file_to_url_map( + skip_patterns=[ + r'debops-keyring/docs/entities(?:\.rst)$', # Auto generated. + r'ansible/roles/debops[^/]+$', # Legacy. + ], + ) +} + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +# +# html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +# html_theme_path = [] -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None +# The name for this set of Sphinx documents. +# " v documentation" by default. +# +# html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# +# html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +# +# html_logo = None -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +# +# html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -277,101 +196,147 @@ def get_source_file_to_url_map(start_dir='.'): # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -#html_extra_path = [] +# +# html_extra_path = [] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +# +# html_last_updated_fmt = None -# http://www.sphinx-doc.org/en/stable/config.html#confval-html_use_smartypants # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -html_use_smartypants = False -# Disabled because it will render :command:`iptables --list` as `iptables –list`. - +# +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +# +# html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -#html_use_opensearch = '' +# +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None -# Output file base name for HTML help builder. -htmlhelp_basename = 'DebOpsdoc' +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' +# +# html_search_language = 'en' +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +# +# html_search_options = {'type': 'default'} -# -- Options for LaTeX output --------------------------------------------- +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# +# html_search_scorer = 'scorer.js' -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', +# Output file base name for HTML help builder. +htmlhelp_basename = 'DebOpsdoc' -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', +# -- Options for LaTeX output --------------------------------------------- -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} +# latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +# +# 'papersize': 'letterpaper', +# +# The font size ('10pt', '11pt' or '12pt'). +# +# 'pointsize': '10pt', +# +# Additional stuff for the LaTeX preamble. +# +# 'preamble': '', +# +# Latex figure (float) alignment +# +# 'figure_align': 'htbp', +# } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ( - 'index', + master_doc, 'DebOps.tex', u'DebOps Documentation', - u'Maciej Delmanowski, Nick Janetakis, Robin Schneider', - 'manual' + author, + 'manual', ), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# +# latex_appendices = [] + +# It false, will not define \strong, \code, itleref, \crossref ... but only +# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added +# packages. +# +# latex_keep_old_macro_names = True # If false, no module index is generated. -#latex_domain_indices = True +# +# latex_domain_indices = True # -- Options for manual page output --------------------------------------- @@ -379,12 +344,18 @@ def get_source_file_to_url_map(start_dir='.'): # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'debops', u'DebOps Documentation', - [u'Maciej Delmanowski, Nick Janetakis, Robin Schneider'], 1) + ( + master_doc, + 'debops', + u'DebOps Documentation', + [author], + 1, + ) ] # If true, show URL addresses after external links. -#man_show_urls = False +# +# man_show_urls = False # -- Options for Texinfo output ------------------------------------------- @@ -394,24 +365,28 @@ def get_source_file_to_url_map(start_dir='.'): # dir menu entry, description, category) texinfo_documents = [ ( - 'index', + master_doc, 'DebOps', u'DebOps Documentation', - u'Maciej Delmanowski, Nick Janetakis, Robin Schneider', + author, 'DebOps', 'One line description of project.', - 'Miscellaneous' + 'Miscellaneous', ), ] # Documents to append as an appendix to all manuals. -#texinfo_appendices = [] +# +# texinfo_appendices = [] # If false, no module index is generated. -#texinfo_domain_indices = True +# +# texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' +# +# texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False +# +# texinfo_no_detailmenu = False diff --git a/docs/includes/30gen_ansible_modules.rst b/docs/includes/30gen_ansible_modules.rst index c81d5f1..874feb5 100644 --- a/docs/includes/30gen_ansible_modules.rst +++ b/docs/includes/30gen_ansible_modules.rst @@ -1,5 +1,5 @@ .. Ansible modules [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_ansible_modules_rst_defs +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_ansible_modules_rst_defs .. _Ansible a10_server module: https://docs.ansible.com/ansible/a10_server_module.html .. _Ansible a10_service_group module: https://docs.ansible.com/ansible/a10_service_group_module.html diff --git a/docs/includes/40gen_debops_api.rst b/docs/includes/40gen_debops_api.rst index 32495b7..e039a24 100644 --- a/docs/includes/40gen_debops_api.rst +++ b/docs/includes/40gen_debops_api.rst @@ -1,5 +1,5 @@ .. debops roles [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_rst_defs_using_debops_api +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_rst_defs_using_debops_api .. _debops.ansible: https://github.com/debops/ansible-role-ansible .. _debops.apache: https://github.com/debops/ansible-apache @@ -44,6 +44,7 @@ .. _debops.gitusers: https://github.com/debops/ansible-gitusers .. _debops.golang: https://github.com/debops/ansible-golang .. _debops.grub: https://github.com/debops/ansible-grub +.. _debops.gunicorn: https://github.com/debops/ansible-gunicorn .. _debops.hashicorp: https://github.com/debops/ansible-hashicorp .. _debops.hwraid: https://github.com/debops/ansible-hwraid .. _debops.ifupdown: https://github.com/debops/ansible-ifupdown @@ -64,6 +65,7 @@ .. _debops.monit: https://github.com/debops/ansible-monit .. _debops.monkeysphere: https://github.com/debops/ansible-monkeysphere .. _debops.mysql: https://github.com/debops/ansible-mysql +.. _debops.netbox: https://github.com/debops/ansible-netbox .. _debops.nfs: https://github.com/debops/ansible-nfs .. _debops.nginx: https://github.com/debops/ansible-nginx .. _debops.nodejs: https://github.com/debops/ansible-nodejs @@ -127,10 +129,12 @@ .. _debops.debops_fact documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-debops_fact/docs/index.html .. _debops.dhcpd documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dhcpd/docs/index.html .. _debops.dhparam documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dhparam/docs/index.html +.. _debops.dnsmasq documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dnsmasq/docs/index.html .. _debops.docker documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-docker/docs/index.html .. _debops.docker_gen documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-docker_gen/docs/index.html .. _debops.dokuwiki documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dokuwiki/docs/index.html .. _debops.dovecot documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dovecot/docs/index.html +.. _debops.elasticsearch documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-elasticsearch/docs/index.html .. _debops.environment documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-environment/docs/index.html .. _debops.etc_services documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-etc_services/docs/index.html .. _debops.fail2ban documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-fail2ban/docs/index.html @@ -139,6 +143,7 @@ .. _debops.gitlab_runner documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-gitlab_runner/docs/index.html .. _debops.golang documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-golang/docs/index.html .. _debops.grub documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-grub/docs/index.html +.. _debops.gunicorn documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-gunicorn/docs/index.html .. _debops.hashicorp documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-hashicorp/docs/index.html .. _debops.ifupdown documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-ifupdown/docs/index.html .. _debops.ipxe documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-ipxe/docs/index.html @@ -153,6 +158,7 @@ .. _debops.mariadb documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-mariadb/docs/index.html .. _debops.mariadb_server documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-mariadb_server/docs/index.html .. _debops.memcached documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-memcached/docs/index.html +.. _debops.netbox documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-netbox/docs/index.html .. _debops.nfs documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-nfs/docs/index.html .. _debops.nodejs documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-nodejs/docs/index.html .. _debops.ntp documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-ntp/docs/index.html @@ -183,4 +189,5 @@ .. _debops.tgt documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-tgt/docs/index.html .. _debops.tinc documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-tinc/docs/index.html .. _debops.unattended_upgrades documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-unattended_upgrades/docs/index.html +.. _debops.users documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-users/docs/index.html .. ]]] diff --git a/docs/includes/45gen_debops_contrib_repos.rst b/docs/includes/45gen_debops_contrib_repos.rst index 0077bde..5f80604 100644 --- a/docs/includes/45gen_debops_contrib_repos.rst +++ b/docs/includes/45gen_debops_contrib_repos.rst @@ -1,5 +1,5 @@ .. DebOps Contrib repositories [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_rst_defs_using_remote_api +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_rst_defs_using_remote_api .. _debops-contrib.openvpn: https://github.com/debops-contrib/ansible-openvpn .. _debops-contrib.nullmailer: https://github.com/debops-contrib/ansible-nullmailer @@ -20,4 +20,7 @@ .. _debops-contrib.btrfs: https://github.com/debops-contrib/ansible-btrfs .. _debops-contrib.x2go_server: https://github.com/debops-contrib/ansible-x2go_server .. _debops-contrib.consul: https://github.com/debops-contrib/ansible-consul +.. _debops-contrib.gdnsd: https://github.com/debops-contrib/ansible-gdnsd +.. _debops-contrib.kibana: https://github.com/debops-contrib/ansible-kibana +.. _debops-contrib.elasticbeats: https://github.com/debops-contrib/ansible-elasticbeats .. ]]] diff --git a/docs/includes/60gen_ypid_repos.rst b/docs/includes/60gen_ypid_repos.rst index c23d23a..5b83b89 100644 --- a/docs/includes/60gen_ypid_repos.rst +++ b/docs/includes/60gen_ypid_repos.rst @@ -1,5 +1,5 @@ .. ypid repositories [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_rst_defs_using_remote_api +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_rst_defs_using_remote_api .. _ypid.copy: https://github.com/ypid/ansible-copy .. _ypid.cryptsetup_remote_unlock: https://github.com/ypid/ansible-cryptsetup_remote_unlock diff --git a/docs/includes/80post.rst b/docs/includes/80post.rst index d62b7f2..d52d43c 100644 --- a/docs/includes/80post.rst +++ b/docs/includes/80post.rst @@ -6,6 +6,8 @@ .. _DebOps project: https://debops.org/ .. _DebOps: https://debops.org/ +.. _DebOps Status: https://debops.org/status.html +.. _DebOps Status page: https://debops.org/status.html .. _DebOps Tools: https://github.com/debops/debops-tools .. _DebOps Galaxy page: https://galaxy.ansible.com/debops/ .. _DebOps API: https://github.com/debops/debops-api @@ -42,6 +44,8 @@ .. _DebOps Security Policy: https://docs.debops.org/en/latest/debops-policy/docs/security-policy.html .. _DebOps Security Announcements mailing list: https://lists.debops.org/mailman/listinfo/debops-security .. _debops-keyring: https://docs.debops.org/en/latest/debops-keyring/docs/index.html +.. _`debops/docs`: https://github.com/debops/docs/ +.. _DebOps docs global.rst: https://github.com/debops/docs/blob/master/docs/includes/global.rst .. ]]] @@ -118,6 +122,7 @@ .. _yaml2rst: https://github.com/htgoebel/yaml2rst .. _yaml4rst: https://github.com/ypid/yaml4rst +.. _ansigenome: https://github.com/nickjj/ansigenome .. _LUKS: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup .. _dm-crypt: https://en.wikipedia.org/wiki/Dm-crypt .. _cryptsetup: https://gitlab.com/cryptsetup/cryptsetup diff --git a/docs/includes/global.rst b/docs/includes/global.rst index f15cc0f..9f8a856 100644 --- a/docs/includes/global.rst +++ b/docs/includes/global.rst @@ -11,7 +11,7 @@ .. ]]] .. Ansible modules [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_ansible_modules_rst_defs +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_ansible_modules_rst_defs .. _Ansible a10_server module: https://docs.ansible.com/ansible/a10_server_module.html .. _Ansible a10_service_group module: https://docs.ansible.com/ansible/a10_service_group_module.html @@ -627,7 +627,7 @@ .. ]]] .. debops roles [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_rst_defs_using_debops_api +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_rst_defs_using_debops_api .. _debops.ansible: https://github.com/debops/ansible-role-ansible .. _debops.apache: https://github.com/debops/ansible-apache @@ -672,6 +672,7 @@ .. _debops.gitusers: https://github.com/debops/ansible-gitusers .. _debops.golang: https://github.com/debops/ansible-golang .. _debops.grub: https://github.com/debops/ansible-grub +.. _debops.gunicorn: https://github.com/debops/ansible-gunicorn .. _debops.hashicorp: https://github.com/debops/ansible-hashicorp .. _debops.hwraid: https://github.com/debops/ansible-hwraid .. _debops.ifupdown: https://github.com/debops/ansible-ifupdown @@ -692,6 +693,7 @@ .. _debops.monit: https://github.com/debops/ansible-monit .. _debops.monkeysphere: https://github.com/debops/ansible-monkeysphere .. _debops.mysql: https://github.com/debops/ansible-mysql +.. _debops.netbox: https://github.com/debops/ansible-netbox .. _debops.nfs: https://github.com/debops/ansible-nfs .. _debops.nginx: https://github.com/debops/ansible-nginx .. _debops.nodejs: https://github.com/debops/ansible-nodejs @@ -755,10 +757,12 @@ .. _debops.debops_fact documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-debops_fact/docs/index.html .. _debops.dhcpd documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dhcpd/docs/index.html .. _debops.dhparam documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dhparam/docs/index.html +.. _debops.dnsmasq documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dnsmasq/docs/index.html .. _debops.docker documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-docker/docs/index.html .. _debops.docker_gen documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-docker_gen/docs/index.html .. _debops.dokuwiki documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dokuwiki/docs/index.html .. _debops.dovecot documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-dovecot/docs/index.html +.. _debops.elasticsearch documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-elasticsearch/docs/index.html .. _debops.environment documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-environment/docs/index.html .. _debops.etc_services documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-etc_services/docs/index.html .. _debops.fail2ban documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-fail2ban/docs/index.html @@ -767,6 +771,7 @@ .. _debops.gitlab_runner documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-gitlab_runner/docs/index.html .. _debops.golang documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-golang/docs/index.html .. _debops.grub documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-grub/docs/index.html +.. _debops.gunicorn documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-gunicorn/docs/index.html .. _debops.hashicorp documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-hashicorp/docs/index.html .. _debops.ifupdown documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-ifupdown/docs/index.html .. _debops.ipxe documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-ipxe/docs/index.html @@ -781,6 +786,7 @@ .. _debops.mariadb documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-mariadb/docs/index.html .. _debops.mariadb_server documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-mariadb_server/docs/index.html .. _debops.memcached documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-memcached/docs/index.html +.. _debops.netbox documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-netbox/docs/index.html .. _debops.nfs documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-nfs/docs/index.html .. _debops.nodejs documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-nodejs/docs/index.html .. _debops.ntp documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-ntp/docs/index.html @@ -811,10 +817,11 @@ .. _debops.tgt documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-tgt/docs/index.html .. _debops.tinc documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-tinc/docs/index.html .. _debops.unattended_upgrades documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-unattended_upgrades/docs/index.html +.. _debops.users documentation: https://docs.debops.org/en/latest/ansible/roles/ansible-users/docs/index.html .. ]]] .. DebOps Contrib repositories [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_rst_defs_using_remote_api +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_rst_defs_using_remote_api .. _debops-contrib.openvpn: https://github.com/debops-contrib/ansible-openvpn .. _debops-contrib.nullmailer: https://github.com/debops-contrib/ansible-nullmailer @@ -835,10 +842,13 @@ .. _debops-contrib.btrfs: https://github.com/debops-contrib/ansible-btrfs .. _debops-contrib.x2go_server: https://github.com/debops-contrib/ansible-x2go_server .. _debops-contrib.consul: https://github.com/debops-contrib/ansible-consul +.. _debops-contrib.gdnsd: https://github.com/debops-contrib/ansible-gdnsd +.. _debops-contrib.kibana: https://github.com/debops-contrib/ansible-kibana +.. _debops-contrib.elasticbeats: https://github.com/debops-contrib/ansible-elasticbeats .. ]]] .. ypid repositories [[[ -.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/bin/gen_rst_defs_using_remote_api +.. This section was generated by: https://github.com/debops/docs/blob/master/docs/docs/_bin/gen_rst_defs_using_remote_api .. _ypid.copy: https://github.com/ypid/ansible-copy .. _ypid.cryptsetup_remote_unlock: https://github.com/ypid/ansible-cryptsetup_remote_unlock @@ -869,6 +879,8 @@ .. _DebOps project: https://debops.org/ .. _DebOps: https://debops.org/ +.. _DebOps Status: https://debops.org/status.html +.. _DebOps Status page: https://debops.org/status.html .. _DebOps Tools: https://github.com/debops/debops-tools .. _DebOps Galaxy page: https://galaxy.ansible.com/debops/ .. _DebOps API: https://github.com/debops/debops-api @@ -905,6 +917,8 @@ .. _DebOps Security Policy: https://docs.debops.org/en/latest/debops-policy/docs/security-policy.html .. _DebOps Security Announcements mailing list: https://lists.debops.org/mailman/listinfo/debops-security .. _debops-keyring: https://docs.debops.org/en/latest/debops-keyring/docs/index.html +.. _`debops/docs`: https://github.com/debops/docs/ +.. _DebOps docs global.rst: https://github.com/debops/docs/blob/master/docs/includes/global.rst .. ]]] @@ -981,6 +995,7 @@ .. _yaml2rst: https://github.com/htgoebel/yaml2rst .. _yaml4rst: https://github.com/ypid/yaml4rst +.. _ansigenome: https://github.com/nickjj/ansigenome .. _LUKS: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup .. _dm-crypt: https://en.wikipedia.org/wiki/Dm-crypt .. _cryptsetup: https://gitlab.com/cryptsetup/cryptsetup