Let $T$ denote the first time when this happens and, for every $|s|\leqslant1$ and $k$ in $\{0,1,2\}$, $u_k(s)=E_k[s^T]$ where $k$ is the number of identical results just produced. One is asking for $P_0[T\leqslant N]$. A one-step Markov conditioning yields the usual linear system $u_0=su_1$, $u_1=s\left(\frac16u_2+\frac56u_1\right)$ and $u_2=s\left(\frac16+\frac56u_1\right)$.
Solving this yields $u_0(s)=\frac{s^3}{36-30s-5s^2}$. There exists two positive real numbers $a$ and $b$ such that $36-30s-5s^2=36(1-as)(1+bs)$, thus $u_0(s)=\frac1{36}\frac1{a+b}s^3\left(\frac{a}{1-as}+\frac{b}{1+bs}\right)$ and, for every $n\geqslant1$, $P_0[T=n+2]=\frac1{36}\frac1{a+b}(a^{n}-(-1)^nb^{n})$. The value of $P_0[T\leqslant N]$ follows.
Numerically, $a=\frac1{12}(5+3\sqrt5)=0.97568$, $b=\frac1{12}(-5+3\sqrt5)=0.14235$, for every $n\geqslant1$, $P_0[T=n+2]=\frac1{18\sqrt{5}}(a^{n}-(-1)^nb^{n})$, and, when $n\to\infty$,
$$
P_0[T=n]\sim\frac{7-3\sqrt5}{5\sqrt5}a^n,\qquad P_0[T\geqslant n]\sim\frac{12}{5\sqrt5}a^n.
$$
Hint.
Roll $9$ times and let $x$ be the total.
For exactly one number $n\in\{1,2,3,4,5,6\}$ we will have $6 \mid (x+n)$ (i.e. $x+n$ is divisible by $6$).
Best Answer
You can compute the result numerically by a recursion or (equivalently) by a Markov chain formulation. The advantage of the former is that you can do some asympotics (as Thomas Andrews showed in the comments).
For completeness, here's the recursion.
Let define the state, $X_t$ as the length of the longest trailing subsequence with different values, after $t=1,2 \cdots$ tries, if the target subsequence (six different values) has not yeat appear, $X_t=6$ otherwise. Let $p(x,t)=P(X_t =x)$.
Hence $X_1=1$ , and we want $p(6,t)$
The recursion is
$$ p(x,t+1)=\begin{cases} \displaystyle{ \frac{6-(x-1)}{6} p(x-1,t) + \frac16 \sum_{k=x}^5 p(k,t)} & {\rm if } \; x=1,2\cdots 5 \\ \displaystyle{ p(6,t) + \frac{1}{6} p(5,t)} & {\rm if }\; x=6 \end{cases} $$
This can be computed numerically, for example with a spreadsheet:
https://docs.google.com/spreadsheets/d/1SJRlXaaS2K1YYNfa7QFcJ29Ks6M2nVf9mlbIteNWwrY
The last column shows the approximation from Thomas Andrews.