You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/docs/docsite/rst/user_guide
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
6 years ago
..
shared_snippets Add docs detailing how to convert many with_X style loops to use loop and filters (#40964) 8 years ago
basic_concepts.rst Docs: User guide overhaul, part 1 (#63056) 6 years ago
become.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
collections_using.rst Add ansible-galaxy collection list command (#65022) 6 years ago
command_line_tools.rst Docs: User guide overhaul, part 1 (#63056) 6 years ago
connection_details.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
guide_rolling_upgrade.rst Docs: User guide overhaul, part 1 (#63056) 6 years ago
index.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
intro.rst Remove more docs build errors (#45364) 7 years ago
intro_adhoc.rst Docs: User guide overhaul, part 1 (#63056) 6 years ago
intro_bsd.rst docs: Prefer python3 on OpenBSD (#65447) 6 years ago
intro_dynamic_inventory.rst Docs: User guide overhaul, part 1 (#63056) 6 years ago
intro_getting_started.rst Fix list formatting in Getting Started docs page (#65713) 6 years ago
intro_inventory.rst Slash missing from /etc/ (#67220) 6 years ago
intro_patterns.rst Update intro_patterns.rst (#67151) 6 years ago
intro_windows.rst removes last :doc: links in user guide (#58433) 7 years ago
modules.rst removes last :doc: links in user guide (#58433) 7 years ago
modules_intro.rst Docs: User guide overhaul, part 1 (#63056) 6 years ago
modules_support.rst fixed some broken links (#66182) 6 years ago
playbook_pathing.rst doc(user_guide): fix typos (#47425) 7 years ago
playbooks.rst Docs: User Guide overhaul, part 3 (#66371) 6 years ago
playbooks_advanced_syntax.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_async.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_best_practices.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_blocks.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_checkmode.rst fix syntax issue (#65166) 6 years ago
playbooks_conditionals.rst Add (more) explicit references to Jinja2 docs in conditionals doc (#61814) 6 years ago
playbooks_debugger.rst Fix a tiny typo (#66589) 6 years ago
playbooks_delegation.rst Update indentation used in the code examples, unify empty lines (#65874) 6 years ago
playbooks_environment.rst [Fix] Typo in playbooks_environment.rst (#64496) 6 years ago
playbooks_error_handling.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_filters.rst combine filter: fine list handling (option b) (#57894) 6 years ago
playbooks_filters_ipaddr.rst playbooks_filters_ipaddr.rst: fix syntax, indentation (#65208) 6 years ago
playbooks_intro.rst Fix indentation (#66991) 6 years ago
playbooks_lookups.rst "with in" changed to "within" (#54990) 7 years ago
playbooks_loops.rst loop: simplify dict2items example in docs (#66235) 6 years ago
playbooks_module_defaults.rst Add module_defaults group for ovirt (#64377) 6 years ago
playbooks_prompts.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_python_version.rst Upstream jinja has decided not to rename from jinja2. (#66880) 6 years ago
playbooks_reuse.rst Docs: User Guide overhaul, part 3 (#66371) 6 years ago
playbooks_reuse_includes.rst Docs: User Guide overhaul, part 3 (#66371) 6 years ago
playbooks_reuse_roles.rst Add library in role directory structure (#67030) 6 years ago
playbooks_roles.rst removes last :doc: links in user guide (#58433) 7 years ago
playbooks_special_topics.rst clarifies FAQ answer about env vars (#48432) 7 years ago
playbooks_startnstep.rst Core Docs Refactor and Redesign (#36067) 8 years ago
playbooks_strategies.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_tags.rst all: fix all the the duplicate words (#66784) 6 years ago
playbooks_templating.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_tests.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
playbooks_variables.rst Mention role defaults file (#67153) 6 years ago
playbooks_vault.rst clarify vault warning and fix typo (#64419) 6 years ago
plugin_filtering_config.rst Update plugin filter documentation (#46665) 7 years ago
quickstart.rst link from quickstart page to Network Getting Started (#65150) 6 years ago
sample_setup.rst Docs: User guide overhaul, part 2 (#65474) 6 years ago
vault.rst Updated "Speeding up Vault Operations" section (#57701) 7 years ago
windows.rst Windows Setup doc; offer 10x perf improvement (#58259) 6 years ago
windows_dsc.rst fixed some broken links (#66182) 6 years ago
windows_faq.rst Deprecate Windows 2008, and 2008 R2 (#66257) 6 years ago
windows_performance.rst Windows Setup doc; offer 10x perf improvement (#58259) 6 years ago
windows_setup.rst remove the word "support" from Windows pages, add Windows Server 2019 (#61404) 6 years ago
windows_usage.rst Prefer https:// links in the docs site (#62939) 6 years ago
windows_winrm.rst Fixes #65590 add pywinrm version explanation (#65591) 6 years ago