Distributed decision-making for community structured networks