From afcb4bf4d0f56df18691f86aba1e45b1b71cb108 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Wed, 19 Oct 2022 10:24:35 +0200 Subject: [PATCH] Fix module. (#5383) (#5386) (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 f65e3c9a86..5d336c6f62 100644 --- 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")