Commit Graph

17 Commits (cb8f645e0f5f52f40c8d309713aba948458b9857)

Author SHA1 Message Date
Alexandre Chouinard 91bb5af688
Update ansible-galaxy to handle role requirements (#68288)
* Update galaxy role object to handle requirements

Co-Authored-By: Sandra McCann <samccann@redhat.com>
4 years ago
Tomáš Pospíšek ddef49bb7f
correctly escape parameters with dashes (#68281) 4 years ago
TAKAHASHI Shuuji b950d18912
Add an example of specifying a specific commit hash. (#67722) 4 years ago
Sandra McCann 8fbec3cdeb
add download tarball option (#67548) 4 years ago
Sam Doran 6c70959131
Update example requirements file docs (#67626)
Use "name" when possible rather than "src" to make the examples
of roles and collections in a single requirements files more
coherenant. Fundamentally, roles and collections are completely different.
But we can make the requiremets file easier to read by unifying the
format as much as possible.
4 years ago
Andrew Klychkov ad8df69b58
docs/docsite/rst/: fix typos (#67645) 4 years ago
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
4 years ago
Sandra McCann 80dff8743a fixed some broken links (#66182) 5 years ago
Sandra McCann 5eceebcaf3 Clarify how to install roles and collections from same requirements file (#65707) 5 years ago
Sandra McCann 2749090bc6 fix collection broken links (#65010) 5 years ago
Baptiste Mille-Mathias 1d0a832692 Fix link to Roles (#64992) 5 years ago
Baptiste Mille-Mathias f198036d7f Remove duplicated and broken link to Roles (#64991) 5 years ago
Alicia Cozine 1df62f129a Collections versions (#64912) 5 years ago
Sandra McCann a01376a493 update configuring ansible-galaxy client (#64796)
* update configuring ansible-galaxy client, deduplicate, clarify tokens, AH procedures, etc.
5 years ago
Sandra McCann ee8a088205 combine galaxy.com install roles details (#63486)
* combine galaxy.com install roles details
* flatten dev guide and user guide for galaxy
5 years ago
Amrita42 7a8c909876 Enter should be Italics as it is a menu option (#63441) 5 years ago
Sandra McCann ae265bc546 Move galaxy appendix info to a new Galaxy section (#63356)
* start galaxy docs restructure
* shared snippets in txt files
* moved all content to galaxy section
5 years ago