Vladimir Botka, I certifie , You are the best Vladimir !! :)
Very the best :) Regards, Le dimanche 18 août 2019 11:47:27 UTC+2, Vladimir Botka a écrit : > > On Sun, 18 Aug 2019 03:45:20 -0500 > Mike Eggleston <[email protected] <javascript:>> wrote: > > I am working on a playbook that uses yum. When yum does an update of all > > installed packages I want to do a conditional shutdown -r. What > condition > > do I check from the yum task succeeding? > > Mike > > 1) If you want to reboot on any change just notify a handler > > - yum: > ... > notify: reboot > > Note: "update_cache" makes "yum" report "changed" even when no package > have > been changed (installed/upgraded/downgraded); hence "update_cache" in a > separate task. > > 2) If you want to reboot on a particular combination of changes register > "yum_result" and make your choice. > > - yum: > ... > register: yum_result > > - command: shutdown -r > when: <condition based on yum_result> > > Note: See details in > How to access information in ansible yum list result? > > https://stackoverflow.com/questions/49272469/how-to-access-information-in-ansible-yum-list-result > > > Cheers, > > -vlado > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fd407e63-483b-4fea-be86-87e23ad87c3a%40googlegroups.com.
