lib: add helper function for applying ring config