Does anybody know if it is possible to make the yum module a little bit dumber and stop it from merging packages in one request? I am trying to install
open-vm-tools
and
open-vm-tools-deploypkg
on a centos vm, playbook snippet below.
`
name: Install Standard Packages
yum: state=present name={{ item }}
with_items:
perl
wget
net-tools
open-vm-tools
open-vm-tools-deploypkg
`
This should in theory work, however the open-vm-tools-deploypkg doesn’t install until open-vm-tools is on the system. I have reviewed the stdout and it places them into one yum install request and in the correct order. but still complains about the pre-requisite. If I seperate the open-vm-tools into another task then it works fine. I know its a minor thing but I would like to cut down the number of tasks as much as possible and was wondering if there is anything that can be done to stop it merging the request.
in 2.0 you can set ANSIBLE_SQUASH_ACTIONS env var or squash_actions in
ansible.cfg to not include the yum module (default is "apt, dnf,
package, pkgng, yum, zypper"). Just note that now you'll be running 1
task per item vs all items in 1 shot and will be much slower.
If you know that you have one particular page that needs to go first, and
you know what it is, you could just create a second task (to run first) to
install that package, and then a second task to install all the rest, right?
-Josh (jbs@care.com)
This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.
Also note, this probably means that there's a bug in the packaging of
open-vm-tools-deploypkg. Might want to report that to the packagers.
If I had to guess without actually looking at the package,
open-vm-tools-deploypkg probably uses some program from open-vm-tools
in its %post or %pre install scriptlets but doesn't specify that as a
proper Requires. As an example, if open-vm-tools-deploypkg ran
something in %post that came from open-vm-tools then the Requires in
open-vm-tools-deploypkg would have to look like Requires(post):
open-vm-tools