It seems like it would be easy to execute something like

http://serverfault.com/questions/122178/how-can-i-check-from-the-command-line-if-a-reboot-is-required-on-rhel-or-centos

with the "script" module and key off the return code.




On Sun, Aug 3, 2014 at 12:55 PM, Schmitt, Christian <
[email protected]> wrote:

> And what about yum based systems? I already made a working playbook with
> the apt upgrade and its really awesome. Finally a solution to drop out
> puppet (:
> Am 03.08.2014 18:16 schrieb "Michael DeHaan" <[email protected]>:
>
>> That seems pretty darn reasonable to me.
>>
>> The ansible stat module could be used to check for presense of that file
>> at the end of the run, and reboot (and wait for SSH to come back up) if so
>> desired.
>>
>>
>>
>>
>> On Sun, Aug 3, 2014 at 11:55 AM, Maciej Delmanowski <[email protected]>
>> wrote:
>>
>>> Perhaps not the "Ansible way", but you could install
>>> 'update-notifer-common' package and see if /var/run/reboot-required file is
>>> present - perhaps via nagios or cron + mail message.
>>>
>>>
>>> http://serverfault.com/questions/92932/how-does-ubuntu-keep-track-of-the-system-restart-required-flag-in-motd
>>>
>>> https://packages.debian.org/wheezy/update-notifier-common
>>>
>>> Maciej
>>>
>>>
>>> 2014-08-03 0:40 GMT+02:00 Christian Schmitt <[email protected]>:
>>>
>>>  Currently i'm running a playbook against multiple servers, is there a
>>>> way to print something if a server needs a reboot after an apt-get upgrade?
>>>> i mean if the kernel gets upgraded i need to know which of them needs
>>>> an restart.
>>>>
>>>> is there a possible way that ansible could report such thing
>>>>
>>>> --
>>>> 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 post to this group, send email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/620390e6-824b-4ac5-bbe3-783e5e7b20d4%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/ansible-project/620390e6-824b-4ac5-bbe3-783e5e7b20d4%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> 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 post to this group, send email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CAEnKK1z__DrKRdCgRtGGaxVuOsnbQHtdK0J6_2V5eX2v3xRUzA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/CAEnKK1z__DrKRdCgRtGGaxVuOsnbQHtdK0J6_2V5eX2v3xRUzA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> 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 post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyqsVDKV68r1ZdNGAc1YnPcM2TYFFzqZc7fXBLJXAX%3DqA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyqsVDKV68r1ZdNGAc1YnPcM2TYFFzqZc7fXBLJXAX%3DqA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> 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 post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAPDLAU5SOgdXuYNNVRePjrYbN%2BvSvv0aZcr-qL6g-Zc158Ec1Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAPDLAU5SOgdXuYNNVRePjrYbN%2BvSvv0aZcr-qL6g-Zc158Ec1Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxpEHih1yc-sweRzeBB6RwD1H%2BR6EpZe8_kxqw3d4CYDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to