Overriding inventory variables with -e switch in Ansible

Let's suppose we have in inventory:

[centos]
centos1 ansible_port=2222
to override this to use the port 22 use -e switch:
ansible centos -m ping -e "ansible_port=22"