Sunan an-Nasa'i, Volume 6, Book 47, Hadith 5040 (DarusSalam)

It was narrated from Ibn 'Umar that : The Messenger of Allah [SAW] said: "The parable of the hypocrite is that of a sheep that hesitates between two flocks, sometimes following one, and sometimes following another, not knowing which to follow."

أَخْبَرَنَا قُتَيْبَةُ قَالَ حَدَّثَنَا يَعْقُوبُ عَنْ مُوسَى بْنِ عُقْبَةَ عَنْ نَافِعٍ عَنْ ابْنِ عُمَرَ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ مَثَلُ الْمُنَافِقِ كَمَثَلِ الشَّاةِ الْعَائِرَةِ بَيْنَ الْغَنَمَيْنِ تَعِيرُ فِي هَذِهِ مَرَّةً وَفِي هَذِهِ مَرَّةً لَا تَدْرِي أَيَّهَا تَتْبَعُ

sunnah.com