From 0d5390a9194e9b27aee2c8df979ea66584dc0315 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Mon, 27 Aug 2018 16:06:06 -0500 Subject: [PATCH] fix yum install with disablerepo (#44735) Signed-off-by: Adam Miller --- lib/ansible/modules/packaging/os/yum.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index 7284849c8f1..dad69ef8722 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -1384,7 +1384,8 @@ class YumModule(YumDnf): my = self.yum_base() try: if self.disablerepo: - my.repos.disableRepo(self.disablerepo) + for rid in self.disablerepo: + my.repos.disableRepo(rid) current_repos = my.repos.repos.keys() if self.enablerepo: try: