US Defense Secretary Jim Mattis dismissed reports of his impending exit from the Pentagon.

Mattis attributed repeated suggestions he could be ousted to the what described as the media's enthusiasm for rumors.

There has been considerable turnover in the Trump administration, but Trump says he's still happy with his Pentagon chief.

Rumors continue to swirl about Defense Secretary Jim Mattis' looming departure from the Pentagon.

Suggestions Mattis could be ousted have surfaced several times during President Donald Trump's time in office.

A recent Politico report said Trump has cooled on the Pentagon chief he once praised, dropping the nickname "Mad Dog" for "Moderate Dog," in what was reported to be a swipe at the defense secretary's purported attempts to moderate or slow-walk White House initiatives.

Mattis was asked about the rumors outside the Pentagon on Tuesday, and he responded with some jokes and jabs of his own.

Mattis denied that he was considering leaving. "I'm thinking about doing my job each day," he said, smiling. He said he wouldn't take reports of his impending departure "seriously at all."

Defense Secretary James Mattis on Friday flatly denied reports the US is planning a missile strike against Iran. Yuri Gripas/Reuters

"It's like most of these kind of things in this town. Somebody cooks up a headline. They then call to a normally chatty class of people. They find a couple of other things to put in. They add the rumor. Somebody on the other coast starts writing the same thing. Next thing you know you got a story," Mattis said.

"It'll die down, just like how many times [have] we been through this now just since I've been here?" he added. "It'll die down soon, and the people who started the rumor will be allowed to write the next rumor too. Just the way the town is. Keep a sense of humor about it."

When asked if he never thought about leaving, Mattis offered some wit as he walked away.

"Of course I don't think about leaving. I love it here. I'm thinking about retiring here, getting a nice little place down on the Potomac," he said, gesturing toward the river, which is not far from the Pentagon.

Mattis was not Trump's first choice for the job.

But one of the president's top candidates, retired Army Gen. Jack Keane spoke highly of Mattis, as did other national-security figures like late Sen. John McCain. (Mattis retired from the Marine Corps as a general in 2013 and had to get a congressional wavier to take over at the Pentagon, as he had not been out of the service for the minimum of seven years.)

In spite of that, Trump touted Mattis before taking office, praising him as "a true General's General." But Mattis has not been able to remain above the intrigue of the Trump White House.

Reports have emerged of Trump's frustration with slow implementation of some of his policies.

A former senior White House official told NBC News this summer that Trump and Mattis "don't really see eye to eye."

The White House reportedly has a shortlist of potential replacements.

Trump — who often touts his prowess as a deal-maker and is said to promote rivalries and infighting between subordinates as part of his management style — has also denied there is a rift.

"We're very happy with him," Trump said this month, when asked about Mattis' future. "We're having a lot of victories."