diff --git a/plugins/modules/packaging/os/pacman_key.py b/plugins/modules/packaging/os/pacman_key.py index 921126b2ad..04d1514a30 100644 --- a/plugins/modules/packaging/os/pacman_key.py +++ b/plugins/modules/packaging/os/pacman_key.py @@ -140,15 +140,6 @@ class PacmanKey(object): fingerprint = self.sanitise_fingerprint(fingerprint) key_present = self.key_in_keyring(keyid, keyring) - if ( - state == "present" - and data is None - and file is None - and url is None - and keyserver is None - ): - module.fail_json(msg="expected one of: data, file, url, keyserver. got none") - if module.check_mode: if state == "present": if (key_present and force_update) or not key_present: @@ -331,6 +322,7 @@ def main(): ), supports_check_mode=True, mutually_exclusive=(('data', 'file', 'url', 'keyserver'),), + required_one_of=[('data', 'file', 'url', 'keyserver'),], ) PacmanKey(module)