The Houston Astros have agreed to a two-year, $17.5 million contract with reliever Ryan Pressly, according to a source.

The agreement will buy out two years of free agency for Pressly. The right-hander was acquired from the Minnesota Twins in July for a pair of prospects.

There is an option to buy out Pressly's deal for a third free-agent year on top of that, according to the report.