# variables for reboot

**URL:** <https://forum.ansible.com/t/variables-for-reboot/31239>\
**Category:** Ansible Project\
**Created:** [September 9, 2019, 2:52pm UTC](https://forum.ansible.com/t/variables-for-reboot/31239 "2019-09-09T14:52:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Weiner](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@Michael\_Weiner](https://forum.ansible.com/u/Michael_Weiner)\
**Post date:** [September 9, 2019, 2:52pm UTC](https://forum.ansible.com/t/variables-for-reboot/31239/1 "2019-09-09T14:52:19Z")

</div>

Howdy all

I have a playbook that I want to run hourly to check for new hosts and I have a script that returns a variable of new and this host gets the yum update and yum reboot and then come around again this host variable is now old…

My question is how can I get this playbook to run the yum update and reboot when the variable returns as new?

If the variable is old then it skips this

---

<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:** [September 9, 2019, 2:55pm UTC](https://forum.ansible.com/t/variables-for-reboot/31239/2 "2019-09-09T14:55:58Z")

</div>

not sure about old variables but, I used yum.changed after a task runs yum update all.
