He even made a covenant with his eyes not to look immorally at a virgin. Keep in mind that this was at a time when God tolerated polygamy.
فَقَدْ عَرَفَ أَنَّهُ ‹ يُنْكِرُ ٱللهَ مِنْ فَوْقُ › إِذَا تَعَبَّدَ لِإِلٰهٍ آخَرَ ،‏ حَتَّى فِي قَلْبِهِ .‏ ‏