summaryrefslogtreecommitdiff
path: root/bin/ansible-galaxy
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ansible-galaxy')
-rwxr-xr-xbin/ansible-galaxy8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/ansible-galaxy b/bin/ansible-galaxy
index c280380c..7732c79a 100755
--- a/bin/ansible-galaxy
+++ b/bin/ansible-galaxy
@@ -10,6 +10,7 @@ __metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI
+import functools
import json
import os.path
import re
@@ -92,6 +93,7 @@ def with_collection_artifacts_manager(wrapped_method):
the related temporary directory auto-cleanup around the target
method invocation.
"""
+ @functools.wraps(wrapped_method)
def method_wrapper(*args, **kwargs):
if 'artifacts_manager' in kwargs:
return wrapped_method(*args, **kwargs)
@@ -286,6 +288,7 @@ class GalaxyCLI(CLI):
# Add sub parser for the Galaxy collection actions
collection = type_parser.add_parser('collection', help='Manage an Ansible Galaxy collection.')
+ collection.set_defaults(func=self.execute_collection) # to satisfy doc build
collection_parser = collection.add_subparsers(metavar='COLLECTION_ACTION', dest='action')
collection_parser.required = True
self.add_download_options(collection_parser, parents=[common, cache_options])
@@ -298,6 +301,7 @@ class GalaxyCLI(CLI):
# Add sub parser for the Galaxy role actions
role = type_parser.add_parser('role', help='Manage an Ansible Galaxy role.')
+ role.set_defaults(func=self.execute_role) # to satisfy doc build
role_parser = role.add_subparsers(metavar='ROLE_ACTION', dest='action')
role_parser.required = True
self.add_init_options(role_parser, parents=[common, force, offline])
@@ -1017,6 +1021,7 @@ class GalaxyCLI(CLI):
@with_collection_artifacts_manager
def execute_download(self, artifacts_manager=None):
+ """Download collections and their dependencies as a tarball for an offline install."""
collections = context.CLIARGS['args']
no_deps = context.CLIARGS['no_deps']
download_path = context.CLIARGS['download_path']
@@ -1243,6 +1248,7 @@ class GalaxyCLI(CLI):
@with_collection_artifacts_manager
def execute_verify(self, artifacts_manager=None):
+ """Compare checksums with the collection(s) found on the server and the installed copy. This does not verify dependencies."""
collections = context.CLIARGS['args']
search_paths = context.CLIARGS['collections_path']
@@ -1280,8 +1286,6 @@ class GalaxyCLI(CLI):
You can pass in a list (roles or collections) or use the file
option listed below (these are mutually exclusive). If you pass in a list, it
can be a name (which will be downloaded via the galaxy API and github), or it can be a local tar archive file.
-
- :param artifacts_manager: Artifacts manager.
"""
install_items = context.CLIARGS['args']
requirements_file = context.CLIARGS['requirements']