On 21. sep. 2017 20:51, daddyocruzer wrote:
Hello

tasks:
   - name:  yum local install
     yum:  name=/sharedfilesystem/*.rpm  state=present

Our team has several environments that lead up to our production
environment, so patches must be applied and tested in one environment at a
time (as they exist at a specific version 'point-in-time') so I can't do a
blind yum update latest in our production environment -- therefore, I
download the latest available at a point-in-time and apply them to each
environment only once testing has succeeded in the previous environment.

Can ansible yum module help 'localinstall' patches that have been
pre-downloaded?   (I've only seen yum module work with a single rpm)


The name support a list or comma separated listing.

So you could do something like this:

  - find:
      paths: /sharedfilesystem
      patterns: '*.rpm'
    register: r

  - yum:
      name: "{{ r.files | map(attribute='path') | list }}"


--
Kai Stian Olstad

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2156589c-2ff3-6060-5f04-dc37f6fbf517%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to