Glasgow coach Dave Rennie will take charge of Australia next summer - with Scotland forwards coach Danny Wilson replacing him at Warriors.
New Zealander Rennie, 55, confirmed his interest in the post last month, having said in April that he was keen to head nearer home for family reasons.
He replaces Michael Cheika, who resigned after Australia's Rugby World Cup quarter-final defeat by England.
Glasgow will announce Wilson as Rennie's replacement on Wednesday.
Rennie, who had also been linked with the vacant New Zealand post, told BBC Scotland last week he was "pretty close to making a decision" on his future.
His recruitment on a three-and-a-half year contract has been described by Rugby Australia as "a massive coup" and he will assume his responsibilities next July.
"We've loved our time here around great people. It's been as good as I could have wished for after leaving New Zealand," Rennie told the Glasgow Warriors website.
"It's an exciting opportunity to coach at international level and an added bonus that we'll be a little closer to home, near our kids and grandkids.
"All my focus is on the rest of the season in Glasgow as we strive to be in the mix come play-off time in both comps again."
In Rennie's first season, Glasgow reached the Pro14 semi-finals and reached the final last term, as well as reaching the European Champions Cup quarter-finals.
They won their opening game in that competition this season against Sale Sharks last weekend and travel to face Exeter Chiefs on Saturday.
Scottish Rugby chief executive Mark Dodson thanked Rennie for "the contribution he's made to the development" of Glasgow since joining from Super Rugby club Chiefs in 2017.
"He's led a talented playing and coaching group with passion and encouraged the team to express themselves and play positive rugby throughout," Dodson added."He enhanced the strong, positive culture at Scotstoun and pushed the team to achieve significant results, playing some outstanding rugby on the way."He has conducted himself throughout with great professionalism and I know he will want to sign off his time in Glasgow with some silverware. We wish him well for the future."
'Wilson ready to strike out on his own' - analysis
BBC Scotland rugby reporter Andy Burke
Having been linked with Australia for the best part of a year, Rennie's appointment comes as no surprise. There was a brief period when he emerged as a contender for the All Blacks job, but former SRU director of rugby Scott Johnson - who's now in a similar role with Australia - identified Rennie as his top target long ago and has got his man.
Wilson is the man chosen to replace Rennie in the top job at Scotstoun. He has been Scotland forwards coach for the past 15 months, having previously spent three years as Cardiff head coach. It seems he's now ready to strike out on his own again as a number one.