<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
<!--- Explain the problem briefly below -->
Reading the [dnf module documentation](https://docs.ansible.com/ansible/latest/modules/dnf_module.html), I should be able to install a yum module just specifing an appstream module name with a profile without the need to specify an appstream version.
But if you omit the appstream version, the dnf ansible plugin crashes with a strack-trace

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
dnf

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible-playbook 2.8.6
  config file = /home/ansible/.virtualenvs/ansb28/ansible.cfg
  configured module search path = [u'/home/ansible/ansb28/ansible/library']
  ansible python module location = /home/ansible/.virtualenvs/ansb28/lib/python2.7/site-packages/ansible
  executable location = /home/ansible/.virtualenvs/ansb28/bin/ansible-playbook
  python version = 2.7.5 (default, Sep 15 2016, 22:37:39) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
ANSIBLE_NOCOWS(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = True
DEFAULT_CALLBACK_PLUGIN_PATH(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = [u'/home/ansibleiso/.virtualenvs/ansb28/lib/python2.7/site-packages/ara/plugins/callbacks']
DEFAULT_CALLBACK_WHITELIST(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = [u'ara']
DEFAULT_INVENTORY_PLUGIN_PATH(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = [u'/home/ansibleiso/.virtualenvs/ansb28/ansible/plugins/inventory']
DEFAULT_MODULE_PATH(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = [u'/home/ansibleiso/ansb28/ansible/library']
DEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = [u'/home/ansible/infra/roles']

```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
management host: CentOS 7
target host: CentOS 8

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
Try to run the following task against a CentOS 8 host:

<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Install rhn-client and other required packages (EL8)
  dnf:
    name: "@satellite-5-client/common"
    state: present
  when: ansible_distribution_major_version == "8"

```
The task fails with the following stacktrace:

```
centos8 | FAILED! => {
    "changed": false, 
    "module_stderr": "Shared connection to 10.4.2.130 closed.\r\n", 
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/usr/lib/python3.6/site-packages/dnf/plugin.py\", line 102, in _caller\r\n    getattr(plugin, method)()\r\n  File \"/usr/lib/python3.6/site-packages/dnf-plugins/spacewalk.py\", line 84, in config\r\n    self.cli.demands.root_user = True\r\nAttributeError: 'NoneType' object has no attribute 'demands'\r\n\r\nTraceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1571403585.19-28589661305719/AnsiballZ_dnf.py\", line 114, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1571403585.19-28589661305719/AnsiballZ_dnf.py\", line 106, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1571403585.19-28589661305719/AnsiballZ_dnf.py\", line 49, in invoke_module\r\n    imp.load_module('__main__', mod, module, MOD_DESC)\r\n  File \"/usr/lib64/python3.6/imp.py\", line 235, in load_module\r\n    return load_source(name, filename, file)\r\n  File \"/usr/lib64/python3.6/imp.py\", line 170, in load_source\r\n    module = _exec(spec, sys.modules[name])\r\n  File \"<frozen importlib._bootstrap>\", line 618, in _exec\r\n  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 1322, in <module>\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 1311, in main\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 1290, in run\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 957, in ensure\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 890, in _is_module_installed\r\nTypeError: 'in <string>' requires string as left operand, not NoneType\r\n", 
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", 
    "rc": 1
}
```

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
The appstream module is installed using the default module version without the need to specify it.

##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
The dnf module crashes


<!--- Paste verbatim command output between quotes -->
```paste below

```

version_added: "2.7"
  update_only:
    description:
      - When using latest, only update installed packages. Do not install packages.
      - Has an effect only if state is I(latest)
    default: "no"
    type: bool
    version_added: "2.7"
  security:
    description:
      - If set to C(yes), and C(state=latest) then only installs updates that have been marked security related.
    type: bool
    default: "no"
    version_added: "2.7"
  bugfix:
    description:
      - If set to C(yes), and C(state=latest) then only installs updates that have been marked bugfix related.
    default: "no"
    type: bool
    version_added: "2.7"
  enable_plugin:
    description:
      - I(Plugin) name to enable for the install/update operation.
        The enabled plugin will not persist beyond the transaction.
    version_added: "2.7"
  disable_plugin:
    description:
      - I(Plugin) name to disable for the install/update operation.
        The disabled plugins will not persist beyond the transaction.
    version_added: "2.7"