diff --git a/docs/docsite/rst/dev_guide/developing_collections.rst b/docs/docsite/rst/dev_guide/developing_collections.rst index 67b255073b9..870723237e6 100644 --- a/docs/docsite/rst/dev_guide/developing_collections.rst +++ b/docs/docsite/rst/dev_guide/developing_collections.rst @@ -400,6 +400,8 @@ You should use one of the values configured in :ref:`COLLECTIONS_PATHS` for your expect to find collections when attempting to use them. If you don't specify a path value, ``ansible-galaxy collection install`` installs the collection in the first path defined in :ref:`COLLECTIONS_PATHS`, which by default is ``~/.ansible/collections``. +If you want to use a collection directly out of a checked out git repository, see :ref:`hacking_collections`. + Next, try using the local collection inside a playbook. For examples and more details see :ref:`Using collections ` .. _collections_scm_install: diff --git a/lib/ansible/config/base.yml b/lib/ansible/config/base.yml index aa5ff152bee..cca8d2b455d 100644 --- a/lib/ansible/config/base.yml +++ b/lib/ansible/config/base.yml @@ -243,7 +243,12 @@ COLLECTIONS_SCAN_SYS_PATH: - {key: collections_scan_sys_path, section: defaults} COLLECTIONS_PATHS: name: ordered list of root paths for loading installed Ansible collections content - description: Colon separated paths in which Ansible will search for collections content. + description: > + Colon separated paths in which Ansible will search for collections content. + Collections must be in nested *subdirectories*, not directly in these directories. + For example, if ``COLLECTIONS_PATHS`` includes ``~/.ansible/collections``, + and you want to add ``my.collection`` to that directory, it must be saved as + ``~/.ansible/collections/ansible_collections/my/collection``. default: ~/.ansible/collections:/usr/share/ansible/collections type: pathspec env: