Commit Graph

87 Commits (f6c83538d3643f9ad393b53a1315bdb84ef8e767)

Author SHA1 Message Date
Dag Wieers ba370b178d
docsite: Add 'Edit on GitHub' for module docs (#36667)
This is something I always wanted, a 'Edit on GitHub' button for module
documentation.

I also removed the additional statement in the footer with instructions
on how to edit the module documentation.

PS The links go directly into the GitHub file editor now !
6 years ago
Dag Wieers 7da7ba79bc Add anchors to some guides and all module categories (#36642)
* Add anchors to some guides and all module categories

This is required if we want to use *absolute* :ref: references instead of *relative* :doc: references.

* Update the Cisco ACI Guide reference

* Add `aci_guide` anchor

* Add `network_guide` anchor

* Add category anchor

* Improve readability

* Fix small typo
6 years ago
scottb 373b1dcf59
Core Docs Refactor and Redesign (#36067)
* Docs refactor as outlined in https://github.com/ansible/proposals/issues/79. Moves content into 'guides'; refactors TOC; fixes CSS; design tweaks to layout and CSS; fixes generated plugin, CLI and module docs to fix links accodingly; more.

* Adding extra blank line for shippable
6 years ago
John R Barker a23c95023b
Module deprecation: docs, scheme and tests (#34100)
Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.

* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index

To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
    removed_module()
```
7 years ago
Dag Wieers 1719267779 Sort arguments and return values in module docs
Comparing the old module docs, with the devel docs the
options/arguments/parameters are no longer sorted.

Also, both in the old module docs and the devel docs the result values
are not sorted where they probably should.
7 years ago
Dag Wieers 73f3b36fb1
Fix modules index delimiter and improve readability (#35187)
* Fix modules index delimiter and improve readability

* Hopefully fixes the links correctly :-/

* Anoteher attempt at this madness
7 years ago
Abhijeet Kasurde f58d9da703 Update link in common footer (#34397)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
John R Barker c50da48049
Fix various RST warnings (#34084)
* Fix various RST warnings

* shorter lines
7 years ago
John R Barker 7381554e42 Compact documentation (#34081)
Before this fix lists of `documentation:` were in individual <p> tags
causing a lot of whitespace on the rendered _module.html pages.
7 years ago
Jordan Borean 0880297909 fix options output for bool type (#34074) 7 years ago
Matt Martz 349099a4c6
Fix sorting in man template on python3. Fixes #33663 (#33673) 7 years ago
Matt Martz 84b8f674a7
Fix py3 docs build (#33345)
* Open file in binary mode to support py3 writes using bytes

* Update sort filter to use an attribute, so that py3 can sort dictionaries
7 years ago
Wolfgang Felbermeier 817a5efff9 Fix css of elbow indentation for firefox (#33225) 7 years ago
Wolfgang Felbermeier 496ce388ab documentation: render nested return dicts for more then one level (#33143)
* Render nested return value documentation for more then one level
in the generated webdocs.

* Remove unnecessary code and cleanup

* Implement recursive option documentation

* Build elbow intendation style for options and return documentation
7 years ago
Brian Coca afc460c943 tollerate 'string' descriptions 7 years ago
Toshio Kuratomi e07cbb033f Keywords docs (#32807)
* Fixup keyword dumping

* Clarify introductory text
* Turn links in the keyword description into seealso entries in the rst.

* Have plugin_formatter cleanup trailing whitespace

The indent filter in jinja2 < 2.10 indents blank lines by default which
leads to trailing whitespace.  Cleanup after that filter.

* Edits

* Copy edit
7 years ago
Ed Santiago 47fb002c88 (minor) fix broken link, awkward phrasing (#32085)
* (minor) fix broken link, awkward phrasing

Simple transposition error was resulting in a link not
being properly htmlified.

Also clean up redundant 'this' and trailing whitespace.

Signed-off-by: Ed Santiago <santiago@redhat.com>

* Edits
7 years ago
Brian Coca 2ed46e04f4 more updates to plugin/config generation (#30787)
* fixed module generation

added missing lookup page
point to plugins when plugins
made modules singular
add display for verbose an debug messages
nicer templating, changed generation order for ref
corrected links
moved most of lookup docs to plugin section

* Copy edits
* Fixed typos
* Clarified wording
7 years ago
sduthil 15dffe04dd fix misformatted docsite link (#31384)
reason: The link is showing verbatim in the docs, where it should only
show "knowledge base article".

Also, generating the docs shows a lot of:

docs/docsite/rst/win_acl_module.rst:424: WARNING: Unknown target name: "know ledge base article<https://access.redhat.com/articles/rhel-top-support-policies>".
7 years ago
Brian Coca b233f3f296 updated plugin docs (#30490)
* updated  docs

- for devs:
  - added inventory/vars section
  - made some updates to general section and other plugin types
- for users:
 - added 'user' plugin section to start describing the plugins
 - docs on types, what they are and how to use

- removed ref to deleted AUTHORS file
- corrected several typos/headers
- added descriptions to config.rst template
- ignore generated files for cli/plugins and config
- remove new generated files on `make clean`
- moved details from devguid and intro doc to plugin specific pages
- pretied up lookup notes
- changed precedence ref to not conflict config
- removed duplicate config data, as config is autogenerated and up to date
- put new plugins under playbooks
- added `pass` cause rst/python dislikes fractions
- removed dupe in .gitignore, alpha sorted to avoid moar dupes
- added try cause rst/python freaks out

* generate plugins into their own dir

only do plugins that support docs
use toctree from main plugins page
7 years ago
Adrian Likins da15cf1f54 Generate plugin rst (#28901)
Generate rst docs for plugins 

Based on rst generated for modules. But generated plugin
docs go into docs/docsite/rst/plugins/$PLUGIN_TYPE/plugin_name.rst
( docs/docsite/rst/plugins/connection/ssh.py for ex)

* move plugins docs to rst/*_plugins/ subdirs for namespace
* Only gen support pages for modules for now.
* Add generated plugin docs to gitignore* add list_*_plugins templates
* support MODULES/PLUGINS filters for make htmldocs

   Add a 'PLUGINS=ssh' filter env var like MODULES to filter plugins to build docs for.

* fixup 'historical' version_added, skip plugins/loader.py
* Fix plugins_by_support ref link to new plugins/*/ location
* use :ref: for common_return_values, allow empty version_added
* warnings on missing doc info
* add a prefix to _random_choice
  It was colliding with the target for random_choice plugin
7 years ago
Adrian Likins 52f2edf19d change generated playbooks_keywords.rst to use an rst 'glossary' (#28843)
* Use a rst glossary for playbooks_keywords docs
* Add a 'Task' and 'Tasks' to glossary.
* Update keywords desciptions,
* use :term: rst ref, some quoting
* Make it more obvious that 'retries' and 'until' need to be used in combination.
7 years ago
Adrian Likins 89c973445c generate rst doc pages for command line tools (#27530)
* let generate_man also gen rst pages for cli tools
* make template-file, output-dir, output format cli options for generate_man
* update main Makefile to use generate_man.py for docs (man pages and rst)
* update vault docs that use :option:
* Edits based on
6e34ea6242 and
a3afc78535

* add a optparse 'desc' to lib/ansible/cli/config.py 

  The man page needs a short desc for the 'NAME' field
  which it gets from the option parse 'desc' value.

  Fixes building ansible-config man page.

* add trim_docstring from pep257 to generate_man

  use pep258 docstring trim function to fix up any indention
  weirdness inherit to doc strings (ie, lines other than
  first line being indented.

* Add refs to cli command actions

To reference ansible-vaults --vault-id option, use:

:option:`The link text here <ansible-vault --vault-id>`

or:

:option:`--vault-id <ansible-vault --vault-id>`

To reference ansible-vault's 'encrypt' action, use:

:ref:`The link text here <ansible_vault_encrypt>`

or most of the time:

:ref:`ansible-vault encrypt <ansible_vault_encrypt>`
7 years ago
Adrian Likins 596dc8c442 Add ANSIBLE_CONFIG envvar to config/envvars tmpl (#28886) 7 years ago
Adrian Likins 8035e68d44 Generate a rst for config and env options from base.yml (#28739)
* wip, gen docs from config/base.yml

* wip

* dont change conf.py here

* cleanup, add dump_config --template-file cli opt

* some desc are string, some are lists...

TODO: fix base.yml so it is consistent

* Filter out TODO and empty descriptions
7 years ago
Toshio Kuratomi 40ea448c7b Misc docs fixes
* Revise and link inline to the lists of modules

* Fix jinja2 objects.inv fallback path

* Fix bolding of deprecation marker

* Change module_support to link to lists via :doc:
  That links to the top of the page instead of a section.

* Add a short text for each list of maintained modules
* Change maintenance info to only display on core and network modules
7 years ago
Jiri Tyr 5660b18b6a Adding missing period into the module doc template 7 years ago
Andreas Maier b900f4a3be Fixed return table in module docs generated by plugin_formatter.py (#25329) (#25330)
This change fixes two issues with the generated return table:

1. When specifying a list of strings in the 'description' field of a
   return value, it shows them in Python list syntax on the resulting
   web page, e.g. `['a', 'b', 'c']`.
2. When specifying more than one line for the 'sample' field, the
   result table gets damaged in the HTML output.

In addition, this change re-arranges the HTML tags produced in the
generated RST file such that they line up nicely and can better be
checked by humans for completeness.

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
7 years ago
Toshio Kuratomi 546187a8af Revamp the plugin_formatter doc generator
* Use a template to generate the category lists
* Refactor so that we first extract all of the data that we need to
  build the docs and then give that data to the templates to build with
* Add docs page listing modules ordered by support level
7 years ago
Toshio Kuratomi af2073d057 metadata 1.1
* Add network value to support_by field.
* New support_by value, certified
* Deprecate curated in favor of certified
* Add conversion from 1.0 to 1.1 to metadata-tool
* Add supported by Red Hat field to ansible-doc output
7 years ago
John R Barker f338dd2fc3 Render returned dictionaries Fixes #24775 (#24777)
plugin.rst.j2 was out of sync with syntax validator
7 years ago
John R Barker ecbf8e933a Docs how to test (2nd) (#24094)
* Big testing doc refactor
* Combine all the testing documentation in to one place to make it easier to find
* Convert everything to RST
* Create testing_network guide
* Create testing landing page
* For each section detail "how to run" and "how to extend testing"
* More examples
* Lots more detail
7 years ago
Brian Coca a0a26700c9 remove author as it dupes 7 years ago
Brian Coca da045a9c1f more info for asciidoc to correctly build manpages 7 years ago
Brian Coca 18a7a1ec31 added docs to CLI docstringsadded
removed 'now intermediate build files' from repo
adjusted gitignore
7 years ago
Brian Coca 424e1946f4 moved docs generation and templates to docs/ 7 years ago
Brian Coca b4c47ebf68 draft to generate man pages 7 years ago