From 36f7ff15e987e902cf6ca6728376f08447740c05 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Wed, 19 Oct 2022 10:24:38 +0200 Subject: [PATCH] Fix module. (#5383) (#5388) (cherry picked from commit c3bdc4b39483a8937981df8512536592cdc9e4b6) Co-authored-by: Felix Fontein --- changelogs/fragments/5383-xenserver_facts.yml | 2 ++ plugins/modules/cloud/misc/xenserver_facts.py | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5383-xenserver_facts.yml diff --git a/changelogs/fragments/5383-xenserver_facts.yml b/changelogs/fragments/5383-xenserver_facts.yml new file mode 100644 index 0000000000..2fee2c8751 --- /dev/null +++ b/changelogs/fragments/5383-xenserver_facts.yml @@ -0,0 +1,2 @@ +bugfixes: + - "xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module from working at all (https://github.com/ansible-collections/community.general/pull/5383)." diff --git a/plugins/modules/cloud/misc/xenserver_facts.py b/plugins/modules/cloud/misc/xenserver_facts.py index 201b59ec4f..567aa07adb 100644 --- a/plugins/modules/cloud/misc/xenserver_facts.py +++ b/plugins/modules/cloud/misc/xenserver_facts.py @@ -162,9 +162,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")