ansible/docs/docsite
Sam Doran f506fd4730
Add ansible-galaxy collection list command (#65022)
* Start adding ansible-galaxy collection list options

* Working list all collections and list a specific collection

* Nuke debugging cruft

* Use to_text to get a string of the FQCN for sorting

* Improve collection output formatting

- add header
- display collection name and version in separate columns
- width of columns is dynamic based on collection name and version length

* Make role list output match collection output list

- add header
- add columns for role name and version
- make column width dynamic based on name and version length

* remove debug statemnt and extra header

* Revert "Make role list output match collection output list"

This reverts commit a0b3db47bb3b198aafd34c1f1be5b6561af2f928.

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Use validate_collection_path

* Do not warn if a specific collection in found in any search path

* Fix extraneous warning and remove duplicate code

Do not warn when listing a specific collection and it does not exist
in other collection paths.

Restructure the code that loops through collection paths to remove
duplicate conditional code.

* Indicate role path was found

* Use new function name

* WIP Save Point

* Use separate functions for role and collection list

* Wrap error message

There may be a better way to do this besides hard coding a line break, but this
does make the message a lot more readable.

* Add validate_collection_path function (#66441)

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Fix bad syntax

* Correct docstring

* Bikeshed the names

* Properly list a single role

* Simplify _display_warnings()

Only display warnings. Move exception raise back to each caller.

* Move private methods to private functions

They don't need self, so it makes sense to have them as functions
Get rid of _display_warnings() function since it doesn't do anything worthy of
an independent function.

* Add integration tests for ansible-galaxy collection list

* Fix docs sanity test

* Fix bug where ansible_collections dir does not exist

The path may exist, but if there is no ansible_collections dir inside that path,
an exception was raised in find_existing_collections().

Add integration test for this scenario

* Put execute_list() method back

* Add some informational messages for debugging

* Add unit tests

Units tests for the various private methods in support of collection list

* Start adding unit tests for test_execute_list

* Display collection path when listing specific collection

* Add unit tests for listing all collections and specific collection

- Create fixture for creating test objects
- Add function for controlling os.path.isdir results

* Set defaults for minimum collection widths

Ensure that collections with small FQCNs display correctly.
Add unit tests

* Split up unit tests and fix fixtures

Add more fixtures for mocking objects during the specific collection tests

* Change help message for -p in list subcommand

Give accurate description of what it actually does rather than trying to use language shared between sub commands.

* Disable colorized output in unit test

* Add docs for collection list

* Fix integration test on macOS

The temp file path is really long on macOS, so the warning message gets wrapped
across multiple lines. That make seth grep fail. Switch to matching on a smaller
part of the warning.

* Recreate common path options for collections

Improve help about what the '-p' option does and how it works.

* Remove unnecessary elif after continue statements

* Account for duplicate paths in collections_searh_paths

If someone specifies the same path via '-p' that is the COLLECTIONS_PATHS,
do not list the collections twice.

* Docs updates
2020-02-14 14:00:00 -06:00
..
_extensions docsite: remove lexers which have been fixed in Pygments 2.4.0 (#57508) 2019-06-18 10:56:33 -05:00
_static Docs: improve anchors vs. header bar (#67244) 2020-02-11 13:16:26 -05:00
_themes/sphinx_rtd_theme docs: Fixed "Edit on GitHub" link for plugin, cli (#66745) 2020-01-30 10:55:46 -05:00
js/ansible
rst Add ansible-galaxy collection list command (#65022) 2020-02-14 14:00:00 -06:00
.gitignore
.nojekyll
jinja2.inv Upstream jinja has decided not to rename from jinja2. (#66880) 2020-01-30 10:57:50 -05:00
keyword_desc.yml Improve ignore_unreachable documentation (#64938) 2019-11-26 13:35:02 -05:00
Makefile Fix netconf plugin related to collections (#65718) 2019-12-20 12:25:59 +05:30
Makefile.sphinx
modules.js
python2.inv Add a script to update the intersphinx inventory (#66646) 2020-01-22 17:20:02 -05:00
python3.inv Add a script to update the intersphinx inventory (#66646) 2020-01-22 17:20:02 -05:00
README.md reduce docs/docsite/README to essential info (#64287) 2019-11-01 15:35:40 -05:00
requirements.txt Move common build code from _build_helpers (#55986) 2019-07-16 12:19:01 -07:00
variables.dot

Ansible documentation

This project hosts the source behind docs.ansible.com.

To create clear, concise, and consistent contributions to Ansible documentation, please refer to the following information.

Contributions

Contributions to the documentation are welcome.

The Ansible community produces guidance on contributions, building documentation, and submitting pull requests, which you can find in Contributing to the Ansible Documentation.

You can also join the Docs Working Group.

Ansible style guide

Ansible documentation is written in ReStructuredText(RST). The Ansible style guide provides linguistic direction and technical guidelines for working with reStructuredText, in addition to other resources.

Tools

The Ansible community uses a range of tools and programs for working with Ansible documentation. Learn more about Other Tools and Programs in the Ansible Community Guide.

GitHub

Ansible documentation is hosted on the Ansible GitHub project. For GitHub workflows and other information, see the GitHub Guides.