From cef42e2541f7ddeaf284b1350eed7f4e46234fe9 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Mon, 28 Nov 2016 15:32:46 -0500 Subject: update tests and flake8/pylint fixes --- library/rpm_q.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'library/rpm_q.py') diff --git a/library/rpm_q.py b/library/rpm_q.py index ca3d0dd89..3dec50fc2 100644 --- a/library/rpm_q.py +++ b/library/rpm_q.py @@ -9,7 +9,7 @@ available. """ # pylint: disable=redefined-builtin,wildcard-import,unused-wildcard-import -from ansible.module_utils.basic import * +from ansible.module_utils.basic import * # noqa: F403 DOCUMENTATION = """ --- @@ -35,16 +35,17 @@ EXAMPLES = """ RPM_BINARY = '/bin/rpm' + def main(): """ Checks rpm -q for the named package and returns the installed packages or None if not installed. """ - module = AnsibleModule( + module = AnsibleModule( # noqa: F405 argument_spec=dict( name=dict(required=True), state=dict(default='present', choices=['present', 'absent']) - ), + ), supports_check_mode=True ) @@ -66,5 +67,6 @@ def main(): else: module.fail_json(msg="%s is installed", installed_versions=installed) + if __name__ == '__main__': main() -- cgit v1.2.3