* Workaround for non-string values
So I think the proper fix should go into html_ify, which should convert
any value into a string, rather than expecting strings only.
* My preferred solution
This PR includes:
- An improvement to the parameter listing, where instead of yes/no, it
is indicated with required/optional (easier when scrolling through a
long list of parameters)
- Ensure that module reference, eg. M(foobar) do not include the module
document title
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 !
* allow shells to have per host options, remote_tmp
added language to shell
removed module lang setting from general as plugins have it now
use get to avoid bad powershell plugin
more resilient tmp discovery, fall back to `pwd`
add shell to docs
fixed options for when frags are only options
added shell set ops in t_e and fixed option frags
normalize tmp dir usag4e
- pass tmpdir/tmp/temp options as env var to commands, making it default for tempfile
- adjusted ansiballz tmpdir
- default local tempfile usage to the configured local tmp
- set env temp in action
add options to powershell
shift temporary to internal envvar/params
ensure tempdir is set if we pass var
ensure basic and url use expected tempdir
ensure localhost uses local tmp
give /var/tmp priority, less perms issues
more consistent tempfile mgmt for ansiballz
made async_dir configurable
better action handling, allow for finally rm tmp
fixed tmp issue and no more tempdir in ballz
hostvarize world readable and admin users
always set shell tempdir
added comment to discourage use of exception/flow control
* Mostly revert expand_user as it's not quite working.
This was an additional feature anyhow.
Kept the use of pwd as a fallback but moved it to a second ssh
connection. This is not optimal but getting that to work in a single
ssh connection was part of the problem holding this up.
(cherry picked from commit 395b714120522f15e4c90a346f5e8e8d79213aca)
* fixed script and other action plugins
ensure tmpdir deletion
allow for connections that don't support new options (legacy, 3rd party)
fixed tests
* Moved generated module RSTs to their own directory.
* WIP commit - fixed conflict with conf.py exclude_patterns by renaming module RST output directory to 'module_docs'.
* Added new directory to formatter module links; aded new module directory to makefile clean.
* Removed illegal comment from block.
* 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
* 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
- old functionality is still available direct lookup use, the following are equivalent
with_nested: [[1,2,3], ['a','b','c']]
loop: "{{lookup('nested', [1,2,3], ['a','b','c'])}}"
- avoid squashing with 'loop:'
- fixed test to use new intenal attributes
- removed most of 'lookup docs' as these now reside in the plugins
* 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
As outlined in https://docs.python.org/3.1/whatsnew/3.0.html#integers,
sys.maxint doesn't exist anymore in Python 3.x because there is no maximum
value for integers in Python 3.x. sys.maxsize is present in all
versions of Python that are currently supported by Ansible, so use that
instead as an arbitrarily large index value.
Fixes the following build error when building with Python 3.x:
make -j1 docs
mkdir -p ./docs/man/man1/ ; \
PYTHONPATH=./lib docs/bin/generate_man.py --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
Traceback (most recent call last):
File "docs/bin/generate_man.py", line 253, in <module>
allvars[cli_name] = opts_docs(cli_class_name, cli_name)
File "docs/bin/generate_man.py", line 119, in opts_docs
'long_desc': trim_docstring(cli.__doc__),
File "docs/bin/generate_man.py", line 34, in trim_docstring
indent = sys.maxint
AttributeError: module 'sys' has no attribute 'maxint'
make: *** [Makefile:347: generate_asciidoc] Error 1
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
* 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>`
* 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
* 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
* 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
* 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
* Implement ability to limit module documentation building:
- Added new option to plugin_formatter.py to support passing-in a list of
modules for which the documentation should be built.
- Updated docuemtnation Makefile to allow specifying list of modules via
environment variables (defaulting to all modules).
- Update instructions for building documentation and module development to
include commands and description of limiting module documentation builds.
* Updated implementation for limiting module documentation building:
- Pass list of modules (or None) to list_modules function instead of string.
- Move conversion of module list to argument parsing code.
- No special keywords. Default ("") means build all modules. For no modules just
specify non-existing module name.
- Updated documentation to reflect the changes.
* Updated implementation for limiting module documentation building:
- Use better default value, and don't treat "" as special case.
- Conditionally invoke different variants of command in Makefile instead of
using special value "".
* Minor edits
Wording tweak