  The Ruderman--Kittel--Kasuya--Yosida (RKKY) interaction governs the coupling
between localized spins and is strongly affected by the environment in which
these spins reside. In superconductors, this interaction becomes long-ranged
and provides information about the orbital symmetry of the superconducting
order parameter. In this work, we consider the RKKY interaction between
localized spins mediated by $p$-wave triplet superconductors. In contrast to
the well-studied RKKY interaction in $d$-wave superconductors, we find that the
spin of the Cooper pair in a triplet state also modulates the spin--spin
coupling. We consider several different types of $p$-wave triplet states, and
find that the form of the RKKY interaction changes significantly with the
symmetries of the order parameter. For non-unitary superconducting states, two
new terms appear in the RKKY interaction: a background spin magnetization
coupling to the individual spins and, more interestingly, an effective
Dzyaloshinskii--Moriya term. The latter term oscillates with the separation
distance between the impurity spins. Finally, we find that the finite spin
expectation value in non-unitary superconductors in concert with the
conventional RKKY interaction can lead to non-collinear magnetic ground states
even when the Dzyaloshinskii--Moriya term is negligible. The RKKY interaction
in $p$-wave triplet superconductors thus offers a way to achieve new ground
state spin configurations of impurity spins and simultaneously provides
information about the underlying superconducting state.
