# Running yum updates with ansible

**URL:** <https://forum.ansible.com/t/running-yum-updates-with-ansible/29556>\
**Category:** Ansible Project\
**Created:** [January 28, 2019, 11:02pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556 "2019-01-28T23:02:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Bidwell](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Post date:** [January 28, 2019, 11:02pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/1 "2019-01-28T23:02:21Z")

</div>

Hey all,

So I’ve done a lot of yum updates with ansible and several times I get issues where partial updates are run and it says it’s been completed, however, I reboot and I’m in a kernel panic because the new kernel didn’t update properly so I have to revert to the previous kernel and remove the newest and reinstall it again. I also often wind up with transactions that haven’t been completed. Has anyone experienced this before?

Thanks!  
Chris

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [January 28, 2019, 11:06pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/2 "2019-01-28T23:06:55Z")

</div>

what version of ansible are you using?

---

<div class="post-metadata">

**Author:** ![Chris\_Bidwell](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Post date:** [January 29, 2019, 1:53pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/3 "2019-01-29T13:53:22Z")

</div>

Using the latest of 2.7.

---

<div class="post-metadata">

**Author:** ![S\_C\_Rigler](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@S\_C\_Rigler](https://forum.ansible.com/u/S_C_Rigler)\
**Post date:** [January 29, 2019, 3:49pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/4 "2019-01-29T15:49:22Z")

</div>

I've seen this also. When the new kernel installs there is a post  
transaction scriplet to build the initrd. In some cases it doesn't  
build correctly (I see it fail maybe 1-5% of the time) and you'll get  
a panic when the system reboots. I don't know that I've seen enough  
to blame it on Ansible, though.

--Steve

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [January 29, 2019, 3:54pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/5 "2019-01-29T15:54:19Z")

</div>

I had a similar issue before with centos but, it was more like a limit ( for example 4 ) of kernels that could be install at the moment but, the current running kernel was uninstalled and the new one did not install correctly so the system hanged during booting.

---

<div class="post-metadata">

**Author:** ![Chris\_Bidwell](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Post date:** [January 29, 2019, 5:24pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/6 "2019-01-29T17:24:49Z")

</div>

So does anyone have any recommendations on how to alleviate this problem? Perhaps some sort of delay before exiting or something?

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [January 29, 2019, 5:47pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/7 "2019-01-29T17:47:47Z")

</div>

well like mentioned this is not ansible specific so i suggest you research more into the OS side.

---

<div class="post-metadata">

**Author:** ![Chris\_Bidwell](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Post date:** [January 29, 2019, 6:14pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/8 "2019-01-29T18:14:40Z")

</div>

Well if I run it manually, I don’t have any issues. I’ll look into it further. Thanks again.

---

<div class="post-metadata">

**Author:** ![mboncalo](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mboncalo](https://forum.ansible.com/u/mboncalo)\
**Post date:** [January 29, 2019, 6:30pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556/9 "2019-01-29T18:30:54Z")

</div>

I know this is an ansible group but you could attach dmesg output if you get one after the kernel fails to boot. Check /var/log/boot-(date) /var/log/dmesg /var/log/yum.log …you can start from there.  
Also I don’t know if you’re logging ansible actions every time, but you could find answers there.
