Repository: ansible-collections/community.general

Issue:
community.general.xenserver_facts module error __init__() missing 1 required positional argument: 'argument_spec'
### Summary

When I try to use the [community.general.xenserver_facts module](https://docs.ansible.com/ansible/latest/collections/community/general/xenserver_facts_module.html) I get an error.

### Issue Type

Bug Report

### Component Name

xenserver_facts_module

### Ansible Version

```console (paste below)
$ ansible --version
ansible [core 2.13.4]
  config file = /home/chris/.ansible.cfg
  configured module search path = ['/home/chris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/chris/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.7 (main, Oct  1 2022, 04:31:04) [GCC 12.2.0]
  jinja version = 3.0.3
  libyaml = True
```


### Community.general Version

```console (paste below)
$ ansible-galaxy collection list community.general

# /home/chris/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 5.7.0  

# /usr/lib/python3/dist-packages/ansible_collections
Collection        Version
----------------- -------
community.general 5.6.0  
```


### Configuration

```console (paste below)
$ ansible-config dump --only-changed
DEFAULT_TIMEOUT(/home/chris/.ansible.cfg) = 300
```


### OS / Environment

Debian Bookworm

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: Gather Xen facts
  community.general.xenserver_facts:
```


### Expected Results

Something other than an error...

### Actual Results

```console (paste below)
TASK [xen : Gather Xen facts] ********************************************************************************************************
task path: /home/chris/webarch/servers/galaxy/roles/xen/tasks/main.yml:2
redirecting (type: modules) community.general.xenserver_facts to community.general.cloud.misc.xenserver_facts
redirecting (type: modules) community.general.xenserver_facts to community.general.cloud.misc.xenserver_facts
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: __init__() missing 1 required positional argument: 'argument_spec'
fatal: [xen4.webarch.net]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 107, in <module>\n  File \"<stdin>\", line 99, in _ansiballz_main\n  File \"<stdin>\", line 47, in invoke_module\n  File \"/usr/lib/python3.9/runpy.py\", line 210, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.9/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.9/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_community.general.xenserver_facts_payload_ilqmvdk8/ansible_community.general.xenserver_facts_payload.zip/ansible_collections/community/general/plugins/modules/cloud/misc/xenserver_facts.py\", line 206, in <module>\n  File \"/tmp/ansible_community.general.xenserver_facts_payload_ilqmvdk8/ansible_community.general.xenserver_facts_payload.zip/ansible_collections/community/general/plugins/modules/cloud/misc/xenserver_facts.py\", line 165, in main\nTypeError: __init__() missing 1 required positional argument: 'argument_spec'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```


### Code of Conduct

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


Discussion:
Files identified in the description:
* [`plugins/modules/cloud/misc/xenserver_facts.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/cloud/misc/xenserver_facts.py)

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/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @caphrim007 @cheese
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->
Funny, it looks like somewhen in the past argument_spec wasn't required, but the tests were never updated to reflect that.
Ah, actually it was always required, it's just that none of the sanity tests catch that. The module was accidentally wrecked in 7da2c16b4a48d420e8522bc0a5d292a0a9a9ca65, looks like nobody noticed that until now (or nobody ever complained).
I created a fix for that in #5383.

Resolving patch:
diff --git a/plugins/modules/cloud/misc/xenserver_facts.py b/plugins/modules/cloud/misc/xenserver_facts.py
--- a/plugins/modules/cloud/misc/xenserver_facts.py
+++ b/plugins/modules/cloud/misc/xenserver_facts.py
@@ -161,9 +161,7 @@ def get_srs(session):
 
 
 def main():
-    module = AnsibleModule(
-        supports_check_mode=True,
-    )
+    module = AnsibleModule({}, supports_check_mode=True)
 
     if not HAVE_XENAPI:
         module.fail_json(changed=False, msg="python xen api required for this module")


Test patch: