If you say that ideally a particular thing should happen or be done, you mean that this is what you would like to happen or be done, but you know that this is may not be possible or practical. People should, ideally, eat much less fat. = preferably
If you say that someone or something is ideally suited, ideally located, or ideally qualified, you mean that they are as well suited, located, or qualified as they could possibly be. They were an extremely happy couple, ideally suited = perfectly