I agree that it depends on the situation. When I was young and somewhat sociopathic, I told a lot of lies, some of them for my benefit at the expense of others--but also many for the benefit of others, even occasionally at my own expense. I don't regret the ones I told to help others.
Now that I'm older and much more empathetic, I believe it's usually
better to tell the truth and almost always best to be honest with the people you're closest to. But in my opinion, there's no need to be obsessive about it.
Whatever will bring the greatest benefit while causing the least harm is, in my opinion, the right course of action, even if it means breaking rules.