From 61743ab39a870bf65bc4646e3e5526b00b1276d6 Mon Sep 17 00:00:00 2001 From: Philippe Makowski Date: Mon, 18 Feb 2019 18:09:23 +0100 Subject: [PATCH] fix bug #47154 (#49881) --- lib/ansible/modules/packaging/os/urpmi.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/ansible/modules/packaging/os/urpmi.py b/lib/ansible/modules/packaging/os/urpmi.py index f2ef0c6c4e..41130bac30 100644 --- a/lib/ansible/modules/packaging/os/urpmi.py +++ b/lib/ansible/modules/packaging/os/urpmi.py @@ -208,20 +208,14 @@ def main(): p = module.params - force_yes = p['force'] - no_recommends_yes = p['no_recommends'] - root = p['root'] - if p['update_cache']: update_package_db(module) - packages = p['package'] - if p['state'] in ['installed', 'present']: - install_packages(module, packages, root, force_yes, no_recommends_yes) + install_packages(module, p['name'], p['root'], p['force'], p['no_recommends']) elif p['state'] in ['removed', 'absent']: - remove_packages(module, packages, root) + remove_packages(module, p['name'], p['root']) if __name__ == '__main__':