I have no idea where you live, where your closet is located and how humid your closet gets.
That said, what I would do is open the cans on a very dry day. Run the Dehumidifier too, and at the end of a few days of dry weather, seal the cans. If they are US Military Ammo Cans they should have a water and moisture proof seal. My experience with them is that even after many years, they still seal up tight. I suppose it would no hurt to run the Humidifier and leave it on a reasonably dry setting as well - but if the cans seal well, I personally would leave them closed.
If your cans do not seal well and you have other ammo just in boxes and the air is very moist then I'd leave the ammo on shelves (not in closed cans) and set up a Humidifier to run on a regular basis.