We investigate the tail behaviour of the steady state distribution of a stochastic recursion that generalises Lindleys recursion. This recursion arises in queuing systems with dependent interarrival and service times, and includes alternating service systems and carousel storage systems as special cases. We obtain precise tail asymptotics in three qualitatively different cases, and compare these with existing results for Lindleys recursion and for alternating service systems.