Does buying a stock after being assigned out of it from a covered call trigger the wash sale rule?

If I'm assigned out of a covered call position (e.g., I bought 100 shares of the stock, sold a call, and was assigned out of the stock when someone exercised the call), can I buy more of that stock without triggering the wash sale rule if the overall trade was at a profit, but the stock assignment was at a loss?

For example, without the wash sale rule, I would expect that there would be a profit for the call position, and a loss from the stock sale, which would partially reduce the capital gain; so the total capital gain would be [call profit - minus stock loss].  However, if I really wanted to be back in the stock, could I buy more of it without complicating my taxes, or would I have to wait past 30 days?

Similarly, if I added to my position not knowing that I would later get called out in less than 30 days, would that also trigger a tax-complicating wash sale rule?