Commit Graph

101 Commits (7654d6e9a8a3f6230b190553b93937ff73affa72)

Author SHA1 Message Date
Brian Coca 18a7a1ec31 added docs to CLI docstringsadded
removed 'now intermediate build files' from repo
adjusted gitignore
2017-03-24 15:52:36 -04:00
Brian Coca b4c47ebf68 draft to generate man pages 2017-03-24 15:52:36 -04:00
Toshio Kuratomi 2fff690caa Update module_utils.six to latest (#22855)
* Update module_utils.six to latest

We've been held back on the version of six we could use on the module
side to 1.4.x because of python-2.4 compatibility.  Now that our minimum
is Python-2.6, we can update to the latest version of six in
module_utils and get rid of the second copy in lib/ansible/compat.
2017-03-23 13:35:05 -07:00
Brian Coca 7839f70e36 Enable documentation in plugins
Made ansible-doc more plugin agnostic
We can have docs in lookup, callback, connectionm strategy, etc
Use first docstring and make pepizis happy
generalized module_docs to plugin_docs
documented cartesian, ssh, default, jsonfile, etc as examples
changed lack of docs to warning when listing
made smarter about bad docstrings
better blacklisting
added handling of options/config/envs/etc
move blacklist to find_plugins, only need once
2017-03-23 01:27:19 -04:00
Toshio Kuratomi eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
2017-03-14 09:07:22 -07:00
Brian Coca 7b9f16becb minor display changes in metadata 2017-03-01 13:12:24 -05:00
Brian Coca b2f7e583d3 moved metadata to bottom 2017-03-01 13:09:18 -05:00
Brian Coca d0e1a1c6c3 more compact metadata 2017-02-27 19:42:35 -05:00
Brian Coca ce08b4165d ansible-doc more flexible to metadata changes 2017-02-24 20:58:37 -05:00
Brian Coca 74421f42e1 ansible doc does not need plugin deprecation error 2017-01-12 13:09:15 -05:00
Brian Coca f533f6603c show filename for module 2016-12-19 14:48:19 -05:00
Matt Clay 43785aa246 Add --all option to ansible-doc. 2016-12-12 12:16:29 -08:00
Matt Davis cb1888125d add metadata to doc support (#18802)
fix broken module docs
change doc AST id extraction to use == instead of in
2016-12-08 11:35:20 -05:00
Matt Clay 88dbb5a630 Python 3 fixes for ansible-doc. 2016-11-03 16:09:24 -07:00
Brian J. Dowling 2be2f35373 Quick ansible-doc fix -- don't run pager if there was an error (no text) 2016-10-13 15:10:47 -04:00
Toshio Kuratomi 1efe782b46 Refactor parsing of CLI args so that we can modify them in the base class
Implement tag and skip_tag handling in the CLI() class.  Change tag and
skip_tag command line options to be accepted multiple times on the CLI
and add them together rather than overwrite.

* Make it configurable whether to merge or overwrite multiple --tags arguments
* Make the base CLI class an abstractbaseclass so we can implement
  functionality in parse() but still make subclasses implement it.
* Deprecate the overwrite feature of --tags with a message that the
  default will change in 2.4 and go away in 2.5.

* Add documentation for merge_multiple_cli_flags
* Fix galaxy search so its tags argument does not conflict with generic tags
* Unit tests and more integration tests for tags
2016-10-06 10:46:58 -04:00
Brian Coca bd9094c925 include_role (role revamp implementation) (#17232)
* attempt #11 to role_include

* fixes from jimi-c

* do not override load_data, move all to load

* removed debugging

* implemented tasks_from parameter, must break cache

* fixed issue with cache and tasks_from

* make resolution of from_tasks prioritize literal

* avoid role dependency dedupe when include_role

* fixed role deps and handlers are now loaded

* simplified code, enabled k=v parsing

used example from jimi-c

* load role defaults for task when include_role

* fixed issue with from_Tasks overriding all subdirs

* corrected priority order of main candidates

* made tasks_from a more generic interface to roles

* fix block inheritance and handler order

* allow vars: clause into included role

* pull vars already processed vs from raw data

* fix from jimi-c blocks i broke

* added back append for dynamic includes

* only allow for basename in from parameter

* fix for docs when no default

* fixed notes

* added include_role to changelog
2016-08-26 13:42:13 -04:00
Toshio Kuratomi 51ec35378d xrange and izip_longest aren't available in vanilla python3 (#17226)
Fixes for these are either rewriting to get rid of the need for the
functions or using six.moves to get equivalent functions for both
python2 and python3
2016-08-24 12:28:02 -07:00
Chris Houseknecht f717786949 Merge pull request #17202 from chouseknecht/devel
Local variable *choices* referenced before assignment
2016-08-24 10:57:49 -04:00
chouseknecht fdb5ecd7d1
Fixes 'choices referenced before assignment' error on line #287. 2016-08-23 16:21:26 -04:00
Toshio Kuratomi a22909c226 Migrate basestring to a python3 compatible type (#17199) 2016-08-23 13:13:44 -07:00
Brian Coca 64a8d24b72 slightly better presentation docs
- description items are now separated
- choices/defaults start at their own line
2016-08-15 11:00:29 -04:00
Brian Coca ae0c1bbc47 ansible-doc now notes when module has action plugin 2016-07-14 15:50:58 -04:00
Matt Davis ec2cb07988 Make 'required' optional in module docs (#15906)
Updated module dev docs, doc build, ansible-doc to match
2016-05-18 16:57:36 -07:00
Brian Coca 3a6ca0b4a6 made ansible-doc complain on missing 'requried' 2016-05-05 17:02:39 -04:00
Brian Coca 1e06a9f48d verifies required is a boolean 2016-04-01 17:45:02 -04:00
Brian Coca 75b9c7db14 moved hardcoded settings from doccli to constants 2016-03-05 17:40:44 -05:00
nitzmahone baece499df fix plugin loading for Windows modules
force plugin loader to only consider .py files, since that's the only place docs can live ATM...
2015-12-16 11:47:12 -08:00
Toshio Kuratomi 4d637e5780 Use self.args when we parse arguments that way the arguments can be constructed manually 2015-12-06 22:17:47 -08:00
Toshio Kuratomi 62979efa14 Finish up plugin porting to global display
Also remove display = display which does nothing
2015-11-11 10:44:23 -08:00
Toshio Kuratomi 318bfbb207 Migrate cli and dependencies to use global display 2015-11-11 10:44:22 -08:00
Brian Coca be22a670e5 addes deprecated information to ansible-doc display
fixes #13118
2015-11-11 11:15:22 -08:00
Brian Coca 5c7d717f31 made ansibledoc more consistent with term sizes, it now uses display class column calculations
cleared up snippet display
2015-11-05 17:42:14 -05:00
Brian Coca 883f451158 fixed snippet display, short_desc is a string, not a list 2015-11-05 14:32:18 -05:00
Toshio Kuratomi f34b55ac2b Add python3-compat boilerplate to all .py files in lib/ansible 2015-10-19 18:36:19 -07:00
Toshio Kuratomi baa309309d Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
Brian Coca 6c190aa8a4 updated ansible-doc to ignore more stuff that has been added to the module repos 2015-10-01 10:17:41 -04:00
Marius Gedminas 339790adc4 Fix option descriptions in ansible-doc output
Fixes #12462.
2015-09-22 10:00:33 +03:00
Brian Coca 91c9df2154 added verbosity to ansible-doc to make it easier to trace down issues 2015-09-10 16:50:14 -04:00
Marius Gedminas 823677b490 Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host).  And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
2015-09-03 09:23:27 +03:00
Marius Gedminas 0c6ce31f76 Use 'except ... as' syntax
This syntax works on Python 2.6 through 3.x.  lib/ansible/module_utils
(and lib/ansible/modules) need to support Python 2.4, so I didn't touch
those.
2015-08-27 22:15:04 +03:00
Brian Coca 2b28cdc0dd be more tolerant with non list descriptions 2015-08-27 14:57:50 -04:00
Brian Coca 154754ae50 pushed module_loader to task_queue_manager so all cli's can benefit from it
also normalized -M option across all cli
fixes #12016
2015-08-25 18:14:03 -04:00
Brian Coca 16f3f8e244 now does not error out when notes are not included in module 2015-08-24 13:24:58 -04:00
Brian Coca 92e2f54228 fixed issues with utf-8 encoding in docs, moved pager to use display class instad of bare prints 2015-08-14 22:00:48 -04:00
Brian Coca 6ba706f753 minor doc reformatting
now version_added < 1.3 does not get shown, up from 1.0
option's version_added is also now filterd against this threshold
module version_added is more prominent
exaples now uses pure rst instead of intermingled with html formatting
aliases now shown in description for options
bad version fields now throw warnings instead of exceptions
ansible-doc errors now show traceback in very very verbose mode, for easier debugging
2015-07-17 10:07:22 -04:00
Brian Coca 5ba9fe4748 now supports maintainers and author field for display as MAINTAINERS 2015-07-16 15:18:33 -04:00
Brian Coca ae6d9ebf28 added maintainers (from author field) to ansible-doc 2015-07-14 17:33:27 -04:00
Brian Coca 5f791329ce now verbose mode shows config file used 2015-07-04 10:23:49 -04:00
Brian Coca faed1b2d05 better error reporting when doc parsing fails 2015-06-17 23:31:54 -04:00
James Cammarata ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00