In the book "In Search of Your European Roots" by Angus Baxter, he discusses "Conscription Records". Since he doesn’t mention military records otherwise, that may be the records you can obtain. As to Conscription Records, (Registri degli Uffici di Leva) he says:
"These started in 1869 and continue to the present day. They include name, birth date, town of residence and whether the draftee served, was refused, was exempted, died or emigrated before the call-up age of eighteen. The records are in the custody of the local Military District (Distretto Militare). The address for the area in which you are interested can be obtained from your nearest Italian Embassy or Consulate."
In his book, "Finding Italian Roots", John P. Colletta says, "Shortly after the unification of Italy, military service became mandatory for all 21 year old males. since about 1870, therefore, registri degli Uffici di Leva (registers of the Offices of Conscription) have been kept. These registri list the name, comune of birth, date of birth, parents' names, and physical description of all young men eligible for the draft, together with an explanation of their military status - whether they ever served, or deserted, or were exempted, and so forth. The registri are divided into annual classe di leva (conscription classes or groups), each of which is indexed by the names of the draftees who composed that classe di leva - that is, the names of those who turned 20 since the previous classe di leva. Registri degli Uffici di Leva are maintained by Distretto Militare (Military District) - a provincia may contain perhaps 5 or 6 distretti militare - and those created since WW I may still be in the custody of the Distretto Militare where they were created. But older registri di leva have been deposited in the archivio di stato."
Mr. Colletta's book contains further details about this subject and would be a worthwhile addition to an Italian genealogical researcher's library.