Two serving British Armed Forces members have admitted trying to sell cannabis.