Yes and no. Elon has ego, but I also take him at his word when he says he wants to open source AI. He did the same thing with Tesla's patents.
Musk has a long history of shamelessly lying when it suits his interest, so you should really really not take him at his word.
"I'd like some of your turkey please and in exchange I will offer this half eaten chicken bone."