Our results suggest a key role for IL17-producing cells in the early phases of infections. Here, IL17A is linked to infection.