I guess you need to use gather_facts: true to be able to use the up time
function here.

Thanks

On Mon, 3 Apr 2023 at 6:52 PM, vinayak sawant <[email protected]>
wrote:

> Hello Visser
>
> Below is my playbook
>
>
> [image: image.png]
>
> anisble_uptime_seconds does not work for me.
>
>
> *Kind Regards*
> *Vinayak Sawant*
>
>
> On Mon, Apr 3, 2023 at 2:30 PM Dick Visser <[email protected]> wrote:
>
>> You have not shared any playbooks.
>> How are you doing this "rolling restart"?
>>
>> If you use the reboot module
>> (
>> https://docs.ansible.com/ansible/latest/collections/ansible/builtin/reboot_module.html
>> ),
>> then that supports the "post_reboot_delay" parameter (as mentioned in
>> a previous answer). That will do what (you say) you need.
>>
>> Dick
>>
>>
>> On Thu, 30 Mar 2023 at 19:59, vinayak sawant <[email protected]>
>> wrote:
>> >
>> > Hello Team
>> >
>> > i am doing rolling restart for servers and it is working fine but what
>> i need to add is when first server is rebooted and its up for 2 minutes
>> then it should go for next server for reboot
>> >
>> > So how can I take that uptime condition with shell in ansible playbook
>> to proceed.
>> >
>> > Kind Regards
>> > Vinayak Sawant
>> >
>> > --
>> > 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/CAM5Hc_jRPxG41%2BsfTFwm7mX-J1tLSzACBrG%3D5qbwg7QXgqqHBQ%40mail.gmail.com
>> .
>>
>> --
>> 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/CAF8BbLZuG9DpLjw0EdfwnUs_iJQOrH0apFsbitgYtfJ6J%2BsqBg%40mail.gmail.com
>> .
>>
> --
> 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/CAM5Hc_hkyYsHsi%3DUJEPUODH%3DVJrKGVhtNnexc%3DB1xLT4OTH-2Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAM5Hc_hkyYsHsi%3DUJEPUODH%3DVJrKGVhtNnexc%3DB1xLT4OTH-2Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAMdx87xoag%3DvdvfLqrJ-qPEvvs2Ac1W_LBSJzGaB4dj86u0UPg%40mail.gmail.com.

Reply via email to