Set role of nodes while joining