Implementing context-dependent behaviour of pervasive computing applications puts a great burden on programmers: Devices need to continuously adapt not only to their own context, but also to the context of other devices they interact with. We present an approach that modularises behavioural adaptations into roles. Role selection takes the context of all the devices involved in an interaction into account, ensures an unambiguous scope of adaptation even in the presence of concurrency, and protects the privacy of the devices. Thus, our contextdependent role (CDR) model facilitates expressing interactions between applications in different, possibly conflicting contexts.