NEW YORK -- Travis Hafner and the New York Yankees have agreed to a one-year, $2 million contract that allows him to earn up to $4 million more in bonuses based on plate appearances.

Hafner, 35, will be the Yankees' left-handed designated hitter, a spot that opened when Raul Ibanez signed with the Seattle Mariners earlier this offseason.

Hafner's career has been derailed by injuries. For four seasons (2004-07) as a member of the Cleveland Indians, he was one of the best hitters in the majors, finishing in the top eight in American League MVP voting each of those years.

In each of the past five seasons, however, Hafner has played in more than 100 games only once. He batted .228 last season with 12 homers and 34 RBIs in 66 games.

From the right side, the Yankees could use a rotation of players to DH, much as they did in 2012.

Eduardo Nunez, if he makes the team, could be one bat, while the Yankees also could use it as a resting stop for older players such as Derek Jeter, Kevin Youkilis and -- if he returns -- Alex Rodriguez.

The Yankees also have picked up right-handed hitting outfielders Matt Diaz, Russ Canzler and Juan Rivera this offseason.

To clear a roster spot for Hafner, the Yankees designated Canzler for assignment.

Information from The Associated Press was used in this report.