generate.py: allow to specify ranges in the hosts section