Anders Holm

Anders Holm has joined the How I Met Your Dad pilot as the soon-to-be ex-husband of Greta Gerwig's Sally, TVGuide.com has confirmed.

The Workaholics and Mindy Project will play Gavin in a recurring capacity if the How I Met Your Mother spin-off goes to series, so the role shouldn't get in the way of his Comedy Central comedy.Holm's casting was first reported by TVLine.

All the news on pilot season

The CBS pilot, which follows Sally on her search for the father of her children, has also added Masters of Sex's Nick D'Agosto as Frank, the head of IT for Juliet's (Krysta Rodriguez)'s fashion blog, and Mixology'sAndrew Santino as Sally's uptight lawyer older brother. HIMYD is in second position for Santino, meaning he would stay on Mixology if it's renewed. The cast also includes Drew Tarver, who will play Sally's best friend and brother-in-law.

(Full disclosure: TVGuide.com is owned by CBS.)