Who put that there? The first guy who decided it a scientifically wise move to put the A/C unit in the attic ultimately could shoulder the blame for this water damaged ceiling — but — unfortunately, he doesn’t live there.
If there are half a dozen technical reasons to put an A/C unit, and its duct work in a one hundred plus degree attic — i.e., Heat transfer, concealment, etc. there are at least a baker’s dozen reasons not to. The ensuing photos are only a few of those reasons. This came from a small leak in an attic mounted A/C unit.
Without going into the many places an attic mounted A/C unit can leak, and assuming those reading are resolved to the cost-effective reasons it must remain there — I can’t emphasize enough importance of inspecting or having the unit serviced regularly by a reliable, certified —