Greetings,
I am trying to copy a number of packages to a remote machine for install using something like this:
https://gist.github.com/stelcheck/6881400
For some reason, the copy iterates over the elements in the packages variable, but yum does the following:
<172.16.0.112> REMOTE_MODULE yum name=/tmp/collectd,libcollectdclient,collectd-amqp,collectd-ascent,collectd-bind,collectd-collection3,collectd-curl,collectd-curl_json,collectd-curl_xml,collectd-dns,collectd-hddtemp,collectd-iptables,collectd-libvirt,collectd-lvm,collectd-memcachec,collectd-mysql,collectd-ping,collectd-python,collectd-rrdtool,collectd-sensors-5.4.0-1.el6.x86_64.rpm enablerepo=epel state=present state=latest
I don’t see what the behavior should be different between copy and yum?
The yum module is explicitly coded to install things in a single transaction, as is the apt module, and a few others in ansible.
Generally speaking this is very desirable, have you hit a specific problem?
I do this normally, but for some reason, when I specify an array as a variable, it looks like it array_joins the array. When I specify an array, I do not have this problem.
Yes, with_items when given to yum will specify everything joined by commas and pass it in, because the module understands this.
This is intended behavior and very specifically coded to do this, so you don’t have to hop into the system 50 times to install 50 packages.
I’m asking why this is a problem as I’m failing to understand what the user scenario is in what you are doing is not working.