Wales' 2-0 victory over Hungary at Cardiff City Stadium ensures that the Republic of Ireland will face Slovakia next March in the Euro 2020 play-off semi-finals.
Mick McCarthy’s men knew that depending on results in Cardiff, an away trip to Slovakia, Bosnia or indeed Wales was on the cards.
Ramsey, making his first Wales start in over a year after being dogged by injuries, scored in each half as Ryan Giggs' side leapfrogged Hungary into second spot in Group E.
The Juventus midfielder headed Wales into a 15th-minute lead to settle the nerves of a capacity Cardiff City Stadium crowd.
Ramsey's second just after the restart was his 16th international goal, with victory securing Wales' third appearance at a major tournament.
Ireland will travel to Bratislava face a side who currently sit one place below them in the Fifa world rankings in the one-legged semi-final.
Slovakia concluded their campaign with a 2-0 win over Azerbaijan, finishing one point behind second-placed Wales in Group E.
Should the Boys in Green emerge victorious on 26 March, they will then face Bosnia or Northern Ireland in the play-off final five days later. Bosnia will enjoy home advantage when they host Michael O'Neill's side.
The details of the play-offs will be confirmed at a draw in Nyon, Switzerland on Friday, where it will be also be decided which of the semi-finalists receives home advantage in the final.