summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdrian Likins <alikins@redhat.com>2017-09-07 15:44:20 -0400
committerGitHub <noreply@github.com>2017-09-07 15:44:20 -0400
commit89c973445c6bbb08551703917a4eec6e484a3e0c (patch)
tree44b97c2d3d83b47cffd0e22cea3f033accc79e07 /lib
parent4a73390823bfe0f1bc6c1a548bb77e9af07e4673 (diff)
downloadansible-89c973445c6bbb08551703917a4eec6e484a3e0c.tar.gz
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 https://github.com/alikins/ansible/commit/6e34ea62429c417939bd96b6de5bf7e6ab1ff765 and https://github.com/alikins/ansible/commit/a3afc785357878da354e21a709cf3b9f16c3f146 * 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>`
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/cli/config.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/cli/config.py b/lib/ansible/cli/config.py
index 7cc7716b90..418b998f38 100644
--- a/lib/ansible/cli/config.py
+++ b/lib/ansible/cli/config.py
@@ -56,7 +56,8 @@ class ConfigCLI(CLI):
self.parser = CLI.base_parser(
usage = "usage: %%prog [%s] [--help] [options] [ansible.cfg]" % "|".join(self.VALID_ACTIONS),
- epilog = "\nSee '%s <command> --help' for more information on a specific command.\n\n" % os.path.basename(sys.argv[0])
+ epilog = "\nSee '%s <command> --help' for more information on a specific command.\n\n" % os.path.basename(sys.argv[0]),
+ desc="View, edit, and manage ansible configuration.",
)
self.parser.add_option('-c', '--config', dest='config_file', help="path to configuration file, defaults to first file found in precedence.")