From 3d081b6ca5d4e7f31db3378d0a649f81494afc10 Mon Sep 17 00:00:00 2001 From: Aine Riordan <44700011+ariordan-redhat@users.noreply.github.com> Date: Thu, 16 Sep 2021 06:42:14 -0700 Subject: [PATCH] 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 --- docs/docsite/rst/user_guide/playbooks_reuse_roles.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst b/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst index eb5ea2dcabb..bc31b12038c 100644 --- a/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst +++ b/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst @@ -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 `. 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 ` 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.