In your classic case of a guy who tells one person one story and another person a different story, yeah, that's pretty disingenuous and makes that person untrustworthy.
However, for example, if you are a gay man in a community that isn't lgbt friendly, then misrepresenting your actual opinion on homosexuality becomes a matter of self preservation. As a minority, it's a pretty common experience to need to control your image carefully in small ways.
The article, however, suggests changing your deeds based on who you are interacting with. I see such behavior in management in my company here and there. I can't stand it. In my opinion, people who engage in such interaction are liars and impediments to success. I see them as a sort of optimized apathy. They say what everyone wants to hear and then they find a way to do almost no work. Or they promise things they never deliver. It creates bad culture because the people who actually do work watch and learn, then apply the same technique.
When you are a chameleon who actually does the work, you're a charismatic and effective employee/leader. When you're a chameleon who doesn't do the work, you're a bullshitter.
If you look at manuals on effective leadership, one of the first pieces of advice is to figure out each person's social style and engage them the way they prefer to interact. Being a chameleon of sorts is part of the skillset of an effective leader. (Specifically, referring to this: https://hbr.org/2000/03/leadership-that-gets-results)