Repository: ansible/ansible
Pull request: make collection warning message clearer
##### SUMMARY
Fix for #74767 collection warning message 

##### ISSUE TYPE
- Bugfix Pull Request

##### COMPONENT NAME
lib/ansible/cli

##### ADDITIONAL INFORMATION
Make the warning message state clearer and state that it will pick up a collection if it's within a playbook adjacent directory.


Problem statement:
Clarify ansible-galaxy collection install warning message
### Summary

```(venv) ➜  ansible-navigator git:(main) ansible-galaxy collection install cisco.ios -p ./collections
Starting galaxy collection install process
[WARNING]: The specified collections path '/Users/bthornto/github/ansible-navigator/collections' is not part of the configured Ansible collections paths '/Users/bthornto/.ansible/collections:/usr/share/ansible/collections'. The installed collection won't be
picked up in an Ansible run.
```
It will be picked up in an Ansible run, in fact playbook adjacent collections are fully Supported.

Can `, unless within a playbook adjacent collections directory` be added to the message?

### Issue Type

Bug Report

### Component Name

ansible-galaxy

### Ansible Version

```console
$ ansible --version

ansible [core 2.11.0]
  config file = None
  configured module search path = ['/Users/bthornto/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/bthornto/github/ansible-navigator/venv/lib/python3.8/site-packages/ansible
  ansible collection location = /Users/bthornto/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/bthornto/github/ansible-navigator/venv/bin/ansible
  python version = 3.8.2 (default, Dec 21 2020, 15:06:04) [Clang 12.0.0 (clang-1200.0.32.29)]
  jinja version = 3.0.0
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
```


### OS / Environment

all

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```shell
(venv) ➜  ansible-navigator git:(main) ansible-galaxy collection install cisco.ios -p ./collections
Starting galaxy collection install process
[WARNING]: The specified collections path '/Users/bthornto/github/ansible-navigator/collections' is not part of the configured Ansible collections paths '/Users/bthornto/.ansible/collections:/usr/share/ansible/collections'. The installed collection won't be
picked up in an Ansible run.
```


### Expected Results

warning messages indicates that if the installation directory is playbook adjacent and called collections it will be picked up by ansible while running the playbook

### Actual Results

```console
received somewhat invalid warning message
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct

Hints from issue discussion:
Files identified in the description:
* `lib/ansible/galaxy`

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->

Commit message: Apply suggestions from code review

Patch to review:
diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py
index 3a24c0dbfa9049..6d9f57a9bff368 100644
--- a/lib/ansible/cli/galaxy.py
+++ b/lib/ansible/cli/galaxy.py
@@ -1202,8 +1202,8 @@ def _execute_install_collection(
         collections_path = C.COLLECTIONS_PATHS
         if len([p for p in collections_path if p.startswith(path)]) == 0:
             display.warning("The specified collections path '%s' is not part of the configured Ansible "
-                            "collections paths '%s'. The installed collection won't be picked up in an Ansible "
-                            "run." % (to_text(path), to_text(":".join(collections_path))))
+                            "collections paths '%s'. The installed collection will not be picked up in an Ansible "
+                            "run, unless adjacent to a playbook." % (to_text(path), to_text(":".join(collections_path))))
 
         output_path = validate_collection_path(path)
         b_output_path = to_bytes(output_path, errors='surrogate_or_strict')


Code review comments:
diff_hunk: @@ -1202,8 +1202,8 @@ def _execute_install_collection(
         collections_path = C.COLLECTIONS_PATHS
         if len([p for p in collections_path if p.startswith(path)]) == 0:
             display.warning("The specified collections path '%s' is not part of the configured Ansible "
-                            "collections paths '%s'. The installed collection won't be picked up in an Ansible "
-                            "run." % (to_text(path), to_text(":".join(collections_path))))
+                            "collections paths '%s'. The installed collection will not be picked up in an Ansible "
+                            "run, unless adjacent to a playbook." % (to_text(path), to_text(":".join(collections_path))))
path: lib/ansible/cli/galaxy.py
text: @user1:
```suggestion
                            "run, unless within a playbook-adjacent collections directory." % (to_text(path), to_text(":".join(collections_path))))
```

diff_hunk: @@ -1202,8 +1202,8 @@ def _execute_install_collection(
         collections_path = C.COLLECTIONS_PATHS
         if len([p for p in collections_path if p.startswith(path)]) == 0:
             display.warning("The specified collections path '%s' is not part of the configured Ansible "
-                            "collections paths '%s'. The installed collection won't be picked up in an Ansible "
-                            "run." % (to_text(path), to_text(":".join(collections_path))))
+                            "collections paths '%s'. The installed collection will not be picked up in an Ansible "
+                            "run, unless adjacent to a playbook." % (to_text(path), to_text(":".join(collections_path))))
path: lib/ansible/cli/galaxy.py
text: @user1:
```suggestion
                            "run, unless within a playbook-adjacent collections directory." % (to_text(path), to_text(":".join(collections_path))))
```