In yesterday's Haftarah, King David instructs King Solomon on his death bed how to deal with various people. Certain people he was to be nice to, and others, not.
Shlomo was told to kill Yoav Ben Tzeruya, who was his army general. David was upset because Yoav killed Avner Ben Ner, the General of Shaul's army.
David really wanted to solidify his kingdom and unite the followers of Shaul. He made a point of attending Avner's funeral in Chevron, to show that he was not part of the plot to kill Avner and it was all Yoav's fault.
We find a similar story in the Talmud where Rav Simi Bar Ashi did a deceptive act to irrigate the fields of Abaye. He offered to irrigate the fields so that Abaye would agree to study with him. He gained access to the water by telling two different stories to field owners living upstream and downstream of the river.
When Abaye learned of Rav Simi's deception, he chose not to eat of the produce of that field. He did not want the people to think he was part of this deception.
We have examples from both the the Tanach and Talmud, how we are to act honestly and without deception.