There are times that military action is justified. Reagan gave fair warning to Gaddafy to leave America and Americans alone. So when Lybian terrorist's fire bombed a peaceful bar occupied by Americans, Reagan immediately sent our fighters to bomb the hell out of one of his strongholds in Lybia. This was pure, simple retaliation with no goal in mind other than swift, terrible, and very expensive/destructive retaliation. And it worked. We didn't hear a peep out of Gaddafy for decades after that.
It was necessary for us to react swiftly, terribly, and destructively to the attack on 9/11. We picked the right target and were extremely effective in taking out most of the enemy. Then with mission accomplished, we should have returned home. It would have been seen as just and appropriate retaliation by the rest of the world and would unlikely have encouraged other such attacks.
It was necessary for us to get rid of the albatross hung around our neck that Iraq had become. Ten years of sanctions had not only enormously enriched, emboldened, and made Saddam Hussein more vile and cruel, but it was funding his export of terrorist activities. Meanwhile most of the Iraqi people were suffering terribly. But we should have gone in with overwhelming force, done the inspections that Saddam had not allowed, destroyed all the chemical warfare making plants and war making machine, confiscated the weapons from Saddam's Republican Guard, taken out Hussein, and left.
If the attack on Lybia is a serious and deadly retaliation for capturing and murdering our people, so be it. If they know it will happen again if they do it again, it definitely could be a deterrence for that sort of thing. But if it is a wag the dog kind of thing in advance of the November election or is supposed to be seen as some kind of brave, noble thing with no idea of what victory will look like, then that's a bad thing.
I'm withholding my opinion about it until I know more about what they are actually doing.