##### SUMMARY

Ansible galaxy collection installation in command line fails when parameter is an URL.

```Shell
ansible-galaxy collection install http://repo.company.com/ansible-collection/my_namespace-my_collection-0.1.tar.gz
Process install dependency map
ERROR! Invalid collection name 'http', name must be in the format <namespace>.<collection>.
```

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME

**ansible-galaxy**

*collection_name* as url parameter should be supported according the documentation:

```Shell
ansible-galaxy collection install -h

positional arguments:
  collection_name       The collection(s) name or path/url to a tar.gz
                        collection artifact. This is mutually exclusive with
                        --requirements-file.
```

##### ANSIBLE VERSION

```
ansible 2.9.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /tmp/venv-project/local/lib/python2.7/site-packages/ansible
  executable location = /tmp/venv-project/bin/ansible
  python version = 2.7.15+ (default, Oct  7 2019, 17:39:04) [GCC 7.4.0]
```

##### CONFIGURATION

```
DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /home/ubuntu/.ansible/.vault-dev.txt
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
```

##### OS / ENVIRONMENT

OS : Ubuntu. Ansible usage via native *apt* package or *pip*.

##### STEPS TO REPRODUCE

Create some ansible collection and publish/upload it on some http endpoint: `http://repo.company.com/ansible-collection/my_namespace-my_collection-0.1.tar.gz`

Installation via local file is working fine (=> collection package is correct):
```Shell
rm -rf ~/.ansible/collections/
wget http://repo.company.com/ansible-collection/my_namespace-my_collection-0.1.tar.gz
ansible-galaxy collection install my_namespace-my_collection-0.1.tar.gz

Process install dependency map
Starting collection install process
Installing 'my_namespace-my_collection:0.1-SNAPSHOT' to '/home/ubuntu/.ansible/collections/ansible_collections/my_namespace/my_collection'
```

Installation via [requirement file](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#install-multiple-collections-with-a-requirements-file) (like #61680) is working fine too:

With `requirements.yml`:

```YAML
---
collections:
- name: http://repo.company.com/ansible-collection/my_namespace-my_collection-0.1.tar.gz
```

```Shell
rm -rf ~/.ansible/collections/
ansible-galaxy collection install -r requirements.yml

Process install dependency map
Starting collection install process
Installing 'my_namespace-my_collection:0.1-SNAPSHOT' to '/home/ubuntu/.ansible/collections/ansible_collections/my_namespace/my_collection'
```

But using command line installation fails:

```Shell
rm -rf ~/.ansible/collections/
ansible-galaxy collection install http://repo.company.com/ansible-collection/my_namespace-my_collection-0.1.tar.gz
Process install dependency map
ERROR! Invalid collection name 'http', name must be in the format <namespace>.<collection>.
```

##### EXPECTED RESULTS

```Shell
Installing 'my_namespace-my_collection:0.1-SNAPSHOT' to '/home/ubuntu/.ansible/collections/ansible_collections/my_namespace/my_collection'
```

##### ACTUAL RESULTS

```Shell
ERROR! Invalid collection name 'http', name must be in the format <namespace>.<collection>.
```

from ansible.utils.collection_loader import AnsibleCollectionRef
from ansible.utils.display import Display
from ansible.utils.hashing import secure_hash, secure_hash_s
from ansible.module_utils.urls import open_url
urlparse = six.moves.urllib.parse.urlparse
urllib_error = six.moves.urllib.error
display = Display()
MANIFEST_FORMAT = 1
class CollectionRequirement:
    _FILE_MAPPING = [(b'MANIFEST.json', 'manifest_file'), (b'FILES.json', 'files_file')]
    def __init__(self, namespace, name, b_path, api, versions, requirement, force, parent=None, metadata=None,
                 files=None, skip=False):
        """
        Represents a collection requirement, the versions that are available to be installed as well as any
        dependencies the collection has.
        :param namespace: The collection namespace.
        :param name: The collection name.
        :param b_path: Byte str of the path to the collection tarball if it has already been downloaded.
        :param api: The GalaxyAPI to use if the collection is from Galaxy.
        :param versions: A list of versions of the collection that are available.
        :param requirement: The version requirement string used to verify the list of versions fit the requirements.
        :param force: Whether the force flag applied to the collection.
        :param parent: The name of the parent the collection is a dependency of.
        :param metadata: The galaxy.api.CollectionVersionMetadata that has already been retrieved from the Galaxy
            server.
        :param files: The files that exist inside the collection. This is based on the FILES.json file inside the
            collection artifact.
        :param skip: Whether to skip installing the collection. Should be set if the collection is already installed
            and force is not set.
        """