Kazakh President Kassym-Jomart Tokayev has signed a law banning civil servants and military personnel from gambling.