Take the list of players in alphabetical order. Put them in the list randomizer on random.org:
This page allows you to randomize lists of strings using true randomness, which for many purposes is better than the pseudo-random number algorithms typically used in computer programs.
www.random.org
That gives everyone their number.
Then take the roles for the game. Place those in the same list randomizer to mix them up. Match the numbers.
If there needs to be further randomness (say, because the role isn't a fixed role it's a "random regular" role, then I use a RNG to pick which number. Specifically, pyrhon random module. So for example Jon rolled RSV. There are eight strong villagers. I go into python and do a random.randint(1,8) and it spits out a number 1-8. Whichever number it gives me is the role. In Jon's case, it was a 7 for ritualist.
If it draws something they can't have, let's say there was another ritualist, then we just re-roll.