Docs: Edit list of locations to search for roles (#75703)

* Docs: Add playbook base dir to roles search

* Docs: Add link to default roles path
pull/75728/head
Aine Riordan 3 years ago committed by GitHub
parent c3fc8fb99a
commit 3d081b6ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,10 +78,12 @@ Roles may also include modules and other plugin types in a directory called ``li
Storing and finding roles
=========================
By default, Ansible looks for roles in two locations:
By default, Ansible looks for roles in the following locations:
- in collections, if you are using them
- in a directory called ``roles/``, relative to the playbook file
- in ``/etc/ansible/roles``
- in the configured :ref:`roles_path <DEFAULT_ROLES_PATH>`. The default search path is ``~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles``.
- in the directory where the playbook file is located
If you store your roles in a different location, set the :ref:`roles_path <DEFAULT_ROLES_PATH>` configuration option so Ansible can find your roles. Checking shared roles into a single location makes them easier to use in multiple playbooks. See :ref:`intro_configuration` for details about managing settings in ansible.cfg.

Loading…
Cancel
Save