I had an inguinal hernia about 5 years ago.
I took two weeks off from the gym. The next time I went to the gym I was tentative about lying leg curls, and that was about it.
The next week (4 weeks after the operation), I set a new PR on the SLDL. And I was squatting with my usual poundage.
Depending on your procedure, mesh, double mesh or whatever, I'm sure after 2 months your doc would tell you it's OK. But to be safe, ask him.
Till you do ask him, just make sure there is no scar tissue pulling or causing stress in the area, and do what your body tells you. If it hurts, don't do it. If it does, back off or find another exercise that doesn't bother it.