### Summary

Hi,

Firstly - it's probably rather strong to call this a bug - it's an inconsistency IMHO.

I have a situation where from time to time my `[production_targets]` group in my inventory in empty - for example:

```
[integration_targets]
dev-01
qa-01

[production_targets]

[targets:children]
integration_targets
production_targets

[targets:vars]
ansible_user=apprunner
```


My expectation was an empty group would result in Ansible doing nothing and returning success - after all, nothing has failed here.  This happens when the limit switch is not applied.

However, at least the way I've described my inventory above seems to lead to an error, specifically when I **limit** to an empty group:

```
ansible-playbook /path/to/deploy.yml -i /path/to/inventory.ini -l production_targets
```

I get an error not a warning:

**ERROR! Specified hosts and/or --limit does not match any hosts**

However it seems if I don't use the limit switch this isn't an error, just a warning:

**[WARNING]: No hosts matched, nothing to do**

I understand the logic in throwing an error (although I think a consistent warning would be less surprising, with and without use of limit) so if my approach is wrong, can you please advise how I can configure ansible to accept a lack of matches in the inventory when also using the limit switch, and move on without throwing an error?

Thanks!



### Issue Type

Bug Report

### Component Name

inventory

### Ansible Version

```console
ansible [core 2.11.9]
```


### Configuration

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


### OS / Environment

Ubuntu 18.04

### Steps to Reproduce


Make yourself an inventory file: callend inv.ini:

```
[integration_targets]
dev-01
qa-01

[production_targets]

[targets:children]
integration_targets
production_targets

[targets:vars]
ansible_user=apprunner
```

Then you can demonstrate the problem just using command line ansible

```
$ ansible targets -i inv.ini -a "ls" -l production_targets
ERROR! Specified hosts and/or --limit does not match any hosts
$ ansible production_targets -i inv.ini -a "ls"
[WARNING]: No hosts matched, nothing to do
```

### Expected Results

I'd expect no matches to give the same consistent error message, whether I apply a limit or not:

```
$ ansible targets -i inv.ini -a "ls" -l production_targets
[WARNING]: No hosts matched, nothing to do
$ ansible production_targets -i inv.ini -a "ls"
[WARNING]: No hosts matched, nothing to do
```

### Actual Results

```console
The first command given an ERROR not a WARNING which seems inconsistent to me:


$ ansible targets -i inv.ini -a "ls" -l production_targets
ERROR! Specified hosts and/or --limit does not match any hosts
$ ansible production_targets -i inv.ini -a "ls"
[WARNING]: No hosts matched, nothing to do
```
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
try:
    from ansible import constants as C
    from ansible.utils.display import Display, initialize_locale
    initialize_locale()
    display = Display()
except Exception as e:
    print('ERROR: %s' % e, file=sys.stderr)
    sys.exit(5)
from ansible import context
from ansible.cli.arguments import option_helpers as opt_help
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
from ansible.inventory.manager import InventoryManager
from ansible.module_utils.six import string_types
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.file import is_executable
from ansible.parsing.dataloader import DataLoader
from ansible.parsing.vault import PromptVaultSecret, get_file_vault_secret
from ansible.plugins.loader import add_all_plugin_dirs
from ansible.release import __version__
from ansible.utils.collection_loader import AnsibleCollectionConfig
from ansible.utils.collection_loader._collection_finder import _get_collection_name_from_path
from ansible.utils.path import unfrackpath
from ansible.utils.unsafe_proxy import to_unsafe_text
from ansible.vars.manager import VariableManager
try:
    import argcomplete
    HAS_ARGCOMPLETE = True
except ImportError:
    HAS_ARGCOMPLETE = False
class CLI(ABC):