table of contents
ANSIBLE-GALAXY(1) | System administration commands | ANSIBLE-GALAXY(1) |
NAME¶
ansible-galaxy - Perform various Role and Collection related operations.
SYNOPSIS¶
usage: ansible-galaxy [-h] [--version] [-v] TYPE ...
DESCRIPTION¶
Command to manage Ansible roles and collections.
None of the CLI tools are designed to run concurrently with themselves. Use an external scheduler and/or locking to ensure there are no clashing operations.
COMMON OPTIONS¶
--version
-h, --help
-v, --verbose
ACTIONS¶
- collection
- Perform the action on an Ansible Galaxy collection. Must be combined with a further action like init/install as listed below.
- collection download
- Download collections and their dependencies as a tarball for an offline
install.
--clear-response-cache
--no-cache
--pre
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-n, --no-deps
-p 'DOWNLOAD_PATH', --download-path 'DOWNLOAD_PATH'
-r 'REQUIREMENTS', --requirements-file 'REQUIREMENTS'
-s 'API_SERVER', --server 'API_SERVER'
- collection init
- Creates the skeleton framework of a role or collection that complies with
the Galaxy metadata format. Requires a role or collection name. The
collection name must be in the format
<namespace>.<collection>.
--collection-skeleton 'COLLECTION_SKELETON'
--init-path 'INIT_PATH'
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-f, --force
-s 'API_SERVER', --server 'API_SERVER'
- collection build
- Build an Ansible Galaxy collection artifact that can be stored in a
central repository like Ansible Galaxy. By default, this command builds
from the current working directory. You can optionally pass in the
collection input path (where the galaxy.yml file is).
--output-path 'OUTPUT_PATH'
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-f, --force
-s 'API_SERVER', --server 'API_SERVER'
- collection publish
- Publish a collection into Ansible Galaxy. Requires the path to the
collection tarball to publish.
--import-timeout 'IMPORT_TIMEOUT'
--no-wait
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-s 'API_SERVER', --server 'API_SERVER'
- collection install
- Install one or more roles(ansible-galaxy role install), or one or
more collections(ansible-galaxy collection install). 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.
--clear-response-cache
--disable-gpg-verify
--force-with-deps
--ignore-signature-status-code
--ignore-signature-status-codes
--keyring 'KEYRING'
--no-cache
--offline
--pre
--required-valid-signature-count 'REQUIRED_VALID_SIGNATURE_COUNT'
--signature
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-U, --upgrade
-c, --ignore-certs
-f, --force
-i, --ignore-errors
-n, --no-deps
-p 'COLLECTIONS_PATH', --collections-path 'COLLECTIONS_PATH'
-r 'REQUIREMENTS', --requirements-file 'REQUIREMENTS'
-s 'API_SERVER', --server 'API_SERVER'
- collection list
- List installed collections or roles
--format 'OUTPUT_FORMAT'
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-p, --collections-path
-s 'API_SERVER', --server 'API_SERVER'
- collection verify
- Compare checksums with the collection(s) found on the server and the
installed copy. This does not verify dependencies.
--ignore-signature-status-code
--ignore-signature-status-codes
--keyring 'KEYRING'
--offline
--required-valid-signature-count 'REQUIRED_VALID_SIGNATURE_COUNT'
--signature
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-i, --ignore-errors
-p, --collections-path
-r 'REQUIREMENTS', --requirements-file 'REQUIREMENTS'
-s 'API_SERVER', --server 'API_SERVER'
- role
- Perform the action on an Ansible Galaxy role. Must be combined with a further action like delete/install/init as listed below.
- role init
- Creates the skeleton framework of a role or collection that complies with
the Galaxy metadata format. Requires a role or collection name. The
collection name must be in the format
<namespace>.<collection>.
--init-path 'INIT_PATH'
--offline
--role-skeleton 'ROLE_SKELETON'
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
--type 'ROLE_TYPE'
-c, --ignore-certs
-f, --force
-s 'API_SERVER', --server 'API_SERVER'
- role remove
- removes the list of roles passed as arguments from the local system.
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-p, --roles-path
-s 'API_SERVER', --server 'API_SERVER'
- role delete
- Delete a role from Ansible Galaxy.
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-s 'API_SERVER', --server 'API_SERVER'
- role list
- List installed collections or roles
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-p, --roles-path
-s 'API_SERVER', --server 'API_SERVER'
- role search
- searches for roles on the Ansible Galaxy server
--author 'AUTHOR'
--galaxy-tags 'GALAXY_TAGS'
--platforms 'PLATFORMS'
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-s 'API_SERVER', --server 'API_SERVER'
- role import
- used to import a role into Ansible Galaxy
--branch 'REFERENCE'
--no-wait
--role-name 'ROLE_NAME'
--status
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-s 'API_SERVER', --server 'API_SERVER'
- role setup
- Setup an integration from Github or Travis for Ansible Galaxy roles
--list
--remove 'REMOVE_ID'
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-p, --roles-path
-s 'API_SERVER', --server 'API_SERVER'
- role info
- prints out detailed information about an installed role as well as info
available from the galaxy API.
--offline
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-p, --roles-path
-s 'API_SERVER', --server 'API_SERVER'
- role install
- Install one or more roles(ansible-galaxy role install), or one or
more collections(ansible-galaxy collection install). 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.
--force-with-deps
--timeout 'TIMEOUT'
--token 'API_KEY', --api-key 'API_KEY'
-c, --ignore-certs
-f, --force
-g, --keep-scm-meta
-i, --ignore-errors
-n, --no-deps
-p, --roles-path
-r 'REQUIREMENTS', --role-file 'REQUIREMENTS'
-s 'API_SERVER', --server 'API_SERVER'
ENVIRONMENT¶
The following environment variables may be specified.
ANSIBLE_CONFIG -- Specify override location for the ansible config file
Many more are available for most options in ansible.cfg
For a full list check https://docs.ansible.com/. or use the ansible-config command.
FILES¶
/etc/ansible/ansible.cfg -- Config file, used if present
~/.ansible.cfg -- User config file, overrides the default config if present
./ansible.cfg -- Local config file (in current working directory) assumed to be 'project specific' and overrides the rest if present.
As mentioned above, the ANSIBLE_CONFIG environment variable will override all others.
AUTHOR¶
Ansible was originally written by Michael DeHaan.
COPYRIGHT¶
Copyright © 2018 Red Hat, Inc | Ansible. Ansible is released under the terms of the GPLv3 license.
SEE ALSO¶
ansible (1), ansible-config (1), ansible-console (1), ansible-doc (1), ansible-inventory (1), ansible-playbook (1), ansible-pull (1), ansible-vault (1)
Extensive documentation is available in the documentation site: <https://docs.ansible.com>. IRC and mailing list info can be found in file CONTRIBUTING.md, available in: <https://github.com/ansible/ansible>
Ansible 2.16.3 |