7. In $\triangle A B C$, the sides opposite to $\angle A 、 \angle B 、 \angle C$ are $a 、 b 、 c$ respectively. If $\frac{\cos B}{\cos C}=-\frac{b}{2 a+c}$. Then $\angle B=$
7. $\frac{2 \pi}{3}$ (or $120^{\circ}$ ).

By the cosine rule, we have
$$
\cos B=\frac{a^{2}+c^{2}-b^{2}}{2 a c}, \cos C=\frac{a^{2}+b^{2}-c^{2}}{2 a b} \text {. }
$$

Substituting the above two equations into the condition, we get
$$
\begin{array}{l}
\frac{a^{2}+c^{2}-b^{2}}{2 a c} \cdot \frac{2 a b}{a^{2}+b^{2}-c^{2}}=-\frac{b}{2 a+c} \\
\Rightarrow a^{2}+c^{2}-b^{2}=-a c .
\end{array}
$$

Then $\cos B=\frac{a^{2}+c^{2}-b^{2}}{2 a c}=\frac{-a c}{2 a c}=-\frac{1}{2}$ $\Rightarrow \angle B=\frac{2 \pi}{3}\left(\right.$ or $\left.120^{\circ}\right)$.