We investigate the tail behaviour of the steady-state distribution of a stochastic recursion that generalises Lindley's recursion. This recursion arises in queueing 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 Lindley's recursion and for alternating service systems.