A former soldier has admitted endangering a constable's life as he tried to 'blow up' a police station with petrol bombs.