factor out common ansible checkout stuff