Pinion yoke cap loose?

I'm just going to start prefacing all of my posts by apologizing if it's either A) already been asked, or B) a stupid question....haha.

So, the other day I was driving down the road and heard a jingling that sounded as if it were coming from under my car. I checked underneath when I got where I was going, and noticed the cap between the pinion yoke and the carrier was just kinda free floating - not attached to anything. It was obvious that this was the source of the jingling noise. I'll post pictures in a few to illustrate.

My question is how do I reattach it, and what is it supposed to attach to? Is it supposed to attach to the yoke or the carrier? Did I do something wrong when installing the rear end that caused this, and is there something I can do to prevent this from happening in the future?

Thanks all!