Documentation for other types in collection requirements.yml (#75872)
This commit is contained in:
@ -83,6 +83,11 @@ Downloading a collection for offline use
|
||||
|
||||
.. include:: ../shared_snippets/download_tarball_collections.txt
|
||||
|
||||
Installing a collection from source files
|
||||
-----------------------------------------
|
||||
|
||||
.. include:: ../shared_snippets/installing_collections_file.rst
|
||||
|
||||
Installing a collection from a git repository
|
||||
---------------------------------------------
|
||||
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
Ansible can also install from a source directory in several ways:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
collections:
|
||||
# directory containing the collection
|
||||
- source: ./my_namespace/my_collection/
|
||||
type: dir
|
||||
|
||||
# directory containing a namespace, with collections as subdirectories
|
||||
- source: ./my_namespace/
|
||||
type: subdirs
|
||||
|
||||
Ansible can also install a collection collected with ``ansible-galaxy collection build`` or downloaded from Galaxy for offline use by specifying the output file directly:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
collections:
|
||||
- source: /tmp/my_namespace-my_collection-1.0.0.tar.gz
|
||||
type: file
|
||||
|
||||
.. note::
|
||||
|
||||
Relative paths are calculated from the current working directory (where you are invoking ``ansible-galaxy install -r`` from). They are not taken relative to the ``requirements.yml`` file.
|
||||
@ -22,7 +22,7 @@ You can specify four keys for each collection entry:
|
||||
|
||||
The ``version`` key uses the same range identifier format documented in :ref:`collections_older_version`.
|
||||
|
||||
The ``type`` key can be set to ``galaxy``, ``url``, ``file``, and ``git``. If ``type`` is omitted, the ``name`` key is used to implicitly determine the source of the collection.
|
||||
The ``type`` key can be set to ``file``, ``galaxy``, ``git``, ``url``, ``dir``, or ``subdirs``. If ``type`` is omitted, the ``name`` key is used to implicitly determine the source of the collection.
|
||||
|
||||
When you install a collection with ``type: git``, the ``version`` key can refer to a branch or to a `git commit-ish <https://git-scm.com/docs/gitglossary#def_commit-ish>`_ object (commit or tag). For example:
|
||||
|
||||
|
||||
@ -37,11 +37,6 @@ Installing an older version of a collection
|
||||
|
||||
.. include:: ../shared_snippets/installing_older_collection.txt
|
||||
|
||||
Installing a collection from a git repository
|
||||
---------------------------------------------
|
||||
|
||||
.. include:: ../shared_snippets/installing_collections_git_repo.txt
|
||||
|
||||
.. _collection_requirements_file:
|
||||
|
||||
Install multiple collections with a requirements file
|
||||
@ -56,6 +51,15 @@ Downloading a collection for offline use
|
||||
|
||||
.. include:: ../shared_snippets/download_tarball_collections.txt
|
||||
|
||||
Installing a collection from source files
|
||||
-----------------------------------------
|
||||
|
||||
.. include:: ../shared_snippets/installing_collections_file.rst
|
||||
|
||||
Installing a collection from a git repository
|
||||
---------------------------------------------
|
||||
|
||||
.. include:: ../shared_snippets/installing_collections_git_repo.txt
|
||||
|
||||
.. _galaxy_server_config:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user