To add Ansible to a CentOS instance in DigitalOcean, first the repo Extra Packages for Enterprise Linux (EPEL) has to be added first:
sudo yum install epel-release
Answer Yes to all questions. Note that this will install the repositoy containing ansible. Next install Ansible:sudo yum install ansible
Finally test your install by typingansible --version
Happy Ansibl’ing!