As President Kennedy used it (in an imperative), it’s very literary — today we would say “don’t ask”. However, as DavidK points out, it is normal (obligatory) to use “not” instead of “don’t” in the negative infinitive. Additionally, we use that pattern in the subjunctive mood, for example: “It’s important that he not be late” or “it’s important that he not work to hard”. (Note that this refers to a situation that is uncertain and that this conservative use of the subjunctive is more common in American English than in British.)