# Module yum: update revision

**URL:** <https://forum.ansible.com/t/module-yum-update-revision/29853>\
**Category:** Ansible Project\
**Created:** [March 8, 2019, 6:41pm UTC](https://forum.ansible.com/t/module-yum-update-revision/29853 "2019-03-08T18:41:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricardo\_Ferreira](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@Ricardo\_Ferreira](https://forum.ansible.com/u/Ricardo_Ferreira)\
**Post date:** [March 8, 2019, 6:41pm UTC](https://forum.ansible.com/t/module-yum-update-revision/29853/1 "2019-03-08T18:41:13Z")

</div>

Hi all,

I need to update a list of packages but to a new revision inside a version.  
If I use state latest the yum module just ignore the version and install the latest version avaliable.  
If I use the state present and the system have already this version installed nothing is done.

for example:  
List of version avaliable:

my-rpm1-1.2.0-r123 (Installed)  
my-rpm1-1.2.0-r130

my-rpm1-1.3.0-1

I want update to ‘my-rpm1-1.2.0-r130’

if I run the following task the version 1.3.0 will be installed, But I need to install the version ‘1.2.0-r130’

- name: install rpm  
yum: name=“{{ item }}” state=latest  
become: yes  
with\_items:
- my-rpm1-1.2.0

Anyone knows How to solver this problem?

---

<div class="post-metadata">

**Author:** ![Soniya\_panwar](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@Soniya\_panwar](https://forum.ansible.com/u/Soniya_panwar)\
**Post date:** [April 4, 2019, 10:20am UTC](https://forum.ansible.com/t/module-yum-update-revision/29853/2 "2019-04-04T10:20:51Z")

</div>

Hello Ricardo,

You can not update the version to its latest revision using “state= latest”. State “latest” will update the specified package if it’s not of the latest available version. In your case, it will update your package to the latest available version which is “my-rpm1-1.3.0-1”.  
To perform updation to a perticular revision, you need to use “state=present” and specify the desired version revision as shown in the below code snippet.

- name: install rpm  
yum: name=“{{ item }}” state=present  
become: yes  
with\_items:
- my-rpm1-1.2.0-r130

Thanks  
Soniya
