This is a continuation of articles showing that the Bible endorses lying. Let us read:
17 Abiathar’s son Jonathan and Zadok’s son Ahimaaz were waiting at the spring of Enrogel, on the outskirts of Jerusalem, because they did not dare be seen entering the city. A servant woman would regularly go and tell them what was happening, and then they would go and tell King David. 18 But one day a boy happened to see them, and he told Absalom; so they hurried off to hide in the house of a certain man in Bahurim.
He had a well near his house, and they got down in it. 19 The man’s wife took a covering, spread it over the opening of the well and scattered grain over it, so that no one would notice anything. 20 Absalom’s officials came to the house and asked the woman, “Where are Ahimaaz and Jonathan?”
“They crossed the river,” she answered. The men looked for them but could not find them, and so they returned to Jerusalem. 21 After they left, Ahimaaz and Jonathan came up out of the well and went and reported to King David. – 2 Samuel 17:17-20
The above passage shows that the spy for David deceived Absalom’s men. Lying to an enemy in war is acceptable in the Bible. YHWH nor David rebukes the servant-woman for lying. Hence, this is another instance where deceiving the enemy by lying to them is permissible.
Thomas Coke Commentary on the Holy Bible
2 Samuel 17:20. They be gone over the brook of water— They passed away quickly. Houbigant. According to Josephus and the Vulgate, the meaning is, that they just drank a little water and hasted forward. Note; (1.) The weakest instruments in God’s hand can answer the greatest purposes. (2.) A lie, though told to serve a good cause, ceases not therefore to be a bad thing. 
Treasury of Scripture Knowledge
They be gone
Exodus 1:19; Joshua 2:4,5; 1 Samuel 19:14-17; 21:2; 27:11,12
when they had sought
Joshua 2:22,23