An investigation has been launched by the Pentagon after apparently classified documents related to the war in Ukraine, Iran, North Korea and other regions were posted online.