Where does this phrase come from?

Where does the phrase “praise the Lord and pass the ammunition” come from?

This is from a song by Frank Loesser. See this CNN article