##### SUMMARY

If I create one `requirements.yml` file which lists all my Ansible dependencies for a given project, including roles and collections from Galaxy, and try to install the dependencies using `ansible-galaxy`, it results in an unexpected and unintuitive behavior.

##### ISSUE TYPE

- Bug Report

##### COMPONENT NAME

ansible-galaxy

##### ANSIBLE VERSION

```
ansible 2.9.5
  config file = /Users/jgeerling/Downloads/blend-test/ansible.cfg
  configured module search path = ['/Users/jgeerling/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.6 (default, Feb  9 2020, 13:28:08) [Clang 11.0.0 (clang-1100.0.33.17)]
```

##### CONFIGURATION

```
ANSIBLE_NOCOWS(/Users/jgeerling/Downloads/blend-test/ansible.cfg) = True
COLLECTIONS_PATHS(/Users/jgeerling/Downloads/blend-test/ansible.cfg) = ['/Users/jgeerling/Downloads/blend-test']
DEFAULT_ROLES_PATH(/Users/jgeerling/Downloads/blend-test/ansible.cfg) = ['/Users/jgeerling/Downloads/blend-test/roles']
```

##### OS / ENVIRONMENT

- macOS Catalina and Ubuntu

##### STEPS TO REPRODUCE

Create a new playbook project directory (e.g. 'example'). Inside the directory, create a `requirements.yml` file with the contents:

```yaml
---
roles:
  # Install a role from Ansible Galaxy.
  - name: geerlingguy.java
    version: 1.9.7

collections:
  # Install a collection from Ansible Galaxy.
  - name: geerlingguy.php_roles
    version: 0.9.5
    source: https://galaxy.ansible.com
```

Run:

    ansible-galaxy install -r requirements.yml

##### EXPECTED RESULTS

All my project dependencies are installed as listed in the `requirements.yml` file.

##### ACTUAL RESULTS

```
$ ansible-galaxy install -r requirements.yml
- downloading role 'java', owned by geerlingguy
- downloading role from https://github.com/geerlingguy/ansible-role-java/archive/1.9.7.tar.gz
- extracting geerlingguy.java to /Users/jgeerling/.ansible/roles/geerlingguy.java
- geerlingguy.java (1.9.7) was installed successfully

$ echo $?
0
```

This command works, and results in only the defined _role_ to install. So after being confused as to why the _collection_ doesn't get installed, I read through the Collections documentation and find that, if I want collections installed, I have to run a separate command. To illustrate:

```
# This will only install roles (and give no warning that collections were detected but not installed).
$ ansible-galaxy install -r requirements.yml

# This results in the same behavior as above.
$ ansible-galaxy role install -r requirements.yml

# This will only install collections (and give no warning that roles were detected but not installed).
$ ansible-galaxy collection install -r requirements.yml
```

Because most of my projects will either require roles or roles and collections in the `requirements.yml` file in the coming months/years (and will likely remain that way for the next few years as many roles on Galaxy that I depend on are not making the jump to Collections (especially simpler ones that are minimally maintained), this UX is kind of difficult to stomach, as now I'll need to make sure to have users do _two_ things every time they use or update one of my playbook projects (and CI will also need to run two commands).

It would make more sense to me to have the following behavior:

```
# Installs everything in requirements.yml (collections and roles).
$ ansible-galaxy install -r requirements.yml

# Only installs roles in requirements.yml (displays warning that there are also collections present in the file, if there are any).
$ ansible-galaxy role install -r requirements.yml

# Only installs collections in requirements.yml (displays warning that there are also roles present in the file, if there are any).
$ ansible-galaxy collection install -r requirements.yml
```
input_dir, output_dir = collection_input
    os.makedirs(os.path.join(input_dir, 'playbooks', 'roles'))
    roles_link = os.path.join(input_dir, 'playbooks', 'roles', 'linked')
    file_link = os.path.join(input_dir, 'docs', 'README.md')
    roles_target = os.path.join(input_dir, 'roles', 'linked')
    roles_target_tasks = os.path.join(roles_target, 'tasks')
    os.makedirs(roles_target_tasks)
    with open(os.path.join(roles_target_tasks, 'main.yml'), 'w+') as tasks_main:
        tasks_main.write("---\n- hosts: localhost\n  tasks:\n  - ping:")
        tasks_main.flush()
    os.symlink(roles_target, roles_link)
    os.symlink(os.path.join(input_dir, 'README.md'), file_link)
    collection.build_collection(input_dir, output_dir, False)
    output_artifact = os.path.join(output_dir, 'ansible_namespace-collection-0.1.0.tar.gz')
    assert tarfile.is_tarfile(output_artifact)
    with tarfile.open(output_artifact, mode='r') as actual:
        members = actual.getmembers()
        linked_members = [m for m in members if m.path.startswith('playbooks/roles/linked/tasks')]
        assert len(linked_members) == 2
        assert linked_members[0].name == 'playbooks/roles/linked/tasks'
        assert linked_members[0].isdir()