Four men have been jailed for their roles in a cannabis cultivation operation.