Upgrade a rpm package on a couple of servers with a quick one-liner in Ansible :
ansible all -b --ask-become-pass -m yum "name=bash state=latest"
servers_list is the text file listing your servers.
Using the ANSIBLE_INVENTORY variable overrides the use of a generate inventory.
This one-liner makes use of the yum Ansible module.
Running sudo commands is possible with these options -b and –ask-become-pass