From 05be82183f40ccd364d362bf40c0180a7d60d8c8 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 9 Jul 2015 08:16:17 -0700 Subject: [PATCH] Add notes about loop squashing and 1.9.2 change to install packages in one yum transaction --- lib/ansible/modules/packaging/os/yum.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index e12ec3a6f28..80de14c8c87 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -118,10 +118,22 @@ options: choices: ["yes", "no"] aliases: [] -notes: [] +notes: + - When used with a loop of package names in a playbook, ansible optimizes + the call to the yum module. Instead of calling the module with a single + package each time through the loop, ansible calls the module once with all + of the package names from the loop. + - In versions prior to 1.9.2 this module installed and removed each package + given to the yum module separately. This caused problems when packages + specified by filename or url had to be installed or removed together. In + 1.9.2 this was fixed so that packages are installed in one yum + transaction. However, if one of the packages adds a new yum repository + that the other packages come from (such as epel-release) then that package + needs to be installed in a separate task. This mimics yum's command line + behaviour. # informational: requirements for nodes requirements: [ yum ] -author: +author: - "Ansible Core Team" - "Seth Vidal" '''