yum module and localinstall

Any plans to have the yum module be able to localinstall local rpms? Sometimes, I just want my own files outside of what is available so it’d be pleasant to be able to just have RPM files for what we need and install them when necessary…

As a corollary to this - at what point do files get transferred from the local machine to the target host? Was looking through the copy module and the md5summing all seemed to already be happening on the host, is the model that all things are transferred immediately and then comparisons done? Or is it magically checking a local sum and a remote sum and only transferring in the event that they are diff’t?

Thanks!

felix

Replies inline.

Any plans to have the yum module be able to localinstall local rpms? Sometimes, I just want my own files outside of what is available so it’d be pleasant to be able to just have RPM files for what we need and install them when necessary…

I think the plans for any open source project need to be well understood – they are what the maintainer needs or wants of them. As such, this use case isn’t really one I need – and I would like to understand your needs better, especially why a yum repo is not a good option, because those
only transfer the content on demand.

I don’t think it’s out of hand to take a patch to let the yum module take name as a filesystem path or something, but I also don’t understand why you’re needing it. Help me understand first :slight_smile:

As a corollary to this - at what point do files get transferred from the local machine to the target host? Was looking through the copy module and the md5summing all seemed to already be happening on the host, is the model that all things are transferred immediately and then comparisons done? Or is it magically checking a local sum and a remote sum and only transferring in the event that they are diff’t?

The copy, template, and raw modules are a bit special, all of the other modules are pretty much standard. We don’t bother md5sum’ing the module sources because they are pretty small, and due to the way paramiko forces us to do sudo handling, we have to do more connection closing in sudo mode and it’s desirable to minimize the ops.

That all being said, I have some refactoring plans for play books and some capabilities I’ll discuss in a later email.

Sorry if I reply to an obsolete thread, but here’s a usecase that I just encountered that might make this useful:
When one wants to add a yum repository(For instance when he wants to install the MySQL community repo), the only option is to do this from a local rpm, thus making it useful to be able to use yum locainstall from within the playbook.
Of course, an easy workaround is using the shell action, and writing the command manually(which isn’t very hard).

This is a thing:

  • name: install local rpmyum: name=/path/to/my/local.rpm

  • James