I am on a mac. I have place a ssh.txt file in the boot partition on the SSD card with the raspbian lite img. When I go and plug my raspberry pi 2 in with the ethernet I cannot ping the pi with ping raspberrypi.local
You've gotten good clues from several here, so I'll just add this:
As @jsotola pointed out, failure to respond to a ping has nothing to do with SSH, but of course you will need SSH to be enabled to connect to your "headless" RPi.
It seems you just need to "locate" your RPi - to get its IP address. There are several ways to do this. One way is to look in your DHCP server's record of leases; you're looking for a device whose MAC address begins with
dc:a6:32 if it's an RPi ver 4B).
If you don't have access to your DHCP server's lease records, you can find your RPi using a few simple commands from the Terminal app on your Mac. There was a similar question asked and answered in this forum recently. And there's a similar approach - perhaps easier to follow - on my GitHub page.
This has worked for me; hopefully it will for you also. Let us know if you have any questions.