summaryrefslogtreecommitdiffstats
path: root/docs/docsite/rst/shared_snippets/installing_collections_file.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
commit8a754e0858d922e955e71b253c139e071ecec432 (patch)
tree527d16e74bfd1840c85efd675fdecad056c54107 /docs/docsite/rst/shared_snippets/installing_collections_file.rst
parentInitial commit. (diff)
downloadansible-core-upstream.tar.xz
ansible-core-upstream.zip
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/docsite/rst/shared_snippets/installing_collections_file.rst')
-rw-r--r--docs/docsite/rst/shared_snippets/installing_collections_file.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/docsite/rst/shared_snippets/installing_collections_file.rst b/docs/docsite/rst/shared_snippets/installing_collections_file.rst
new file mode 100644
index 0000000..7c4fbcd
--- /dev/null
+++ b/docs/docsite/rst/shared_snippets/installing_collections_file.rst
@@ -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:
+ - name: /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.