conditional variables depending on time

I am trying to output what shift an event has happened depending on the time of day, but keep running into errors or getting nothing back.

There are two reason this will not work.
The second shift will overwrite the first shift and the third shift will overwrite the second shift.
ansible_date_time.time is a string an you are comparing string, since time compare and string compare is completely different thing, this will not work as you would like.

I figured it out by using set_fact and when for the conditionals. Thanks for the reply.