Make use of ranges in the Ansible inventory

In inventory:

[centos]
centos1 ansible_port=2222
centos[2:3] ansible_user=root

[ubuntu]
ubuntu[1:3] ansible_become=true ansible_become_password=password