Yes. Don't specify dependencies when you don't need them. Take the arrows (->) out and this will work just fine.
Longer answer: The postgresql::server::contrib already specifies its dependencies. It inserts itself after the server install class, but before the server service class. But when you specify another dependency on the whole server class that contains both of those, you're effectively telling it to happen before the service class and after the service class. Clearly impossible.