This blog is a continuation of the blog series 1) Introduction to Ansible and 2) Ansible concepts overview and useful tips for writing playbooks.
In this blog, I cover Ansible Galaxy and point to useful roles in Galaxy to install and configure popular applications. I also share a role I created to add the official Dell repositories for Dell System Update (DSU) and OpenManage Server Administrator (OMSA) on Red Hat Enterprise Server (RHEL) and Ubuntu Server.
Ansible Galaxy is an online repository where you can share roles with others and download roles that others have written to install and configure just about any application you want to use. You can click here to see the most popular roles for managing applications, which include nginx, Jenkins and redis, just to mention a few.
Since Ansible can also be used for tasks other than managing installing and applications, roles can be used for doing a variety of system administration tasks like configuring networking, managing containers and virtual machines, beefing up system security and cleaning up log files.
Creating a role is beyond the scope of this blog, but after going through the documentation you should be ready to create a role in no time (this blog was useful too). Once you have created your first role, put it in a git repository and upload it to GitHub. Since you can link your GitHub account with Galaxy, adding a role in Galaxy is done by importing your repository in GitHub from the Galaxy management page.
Role to add Dell repositories
I created the dellreposetup role in Ansible Galaxy to add the official Dell repositories for installing DSU, which includes OMSA and firmware updates for your Dell PowerEdge servers. To install the role on your control machine, run:
$ ansible-galaxy install jose-delarosa.dellreposetup
Note: If you are behind a corporate proxy server and are having problems installing roles from Galaxy, upgrade to Ansible v2.1 to solve the issue.
To incorporate this role to your existing playbooks, add:
# I assume a ‘dell’ group exists in /etc/ansible/hosts – see documentation
- hosts: dell
- role: jose-delarosa.dellreposetup
This role checks for a supported Linux distribution, adds the Dell repositories, installs DSU and OMSA, enables and starts services and opens firewall ports as needed. When all tasks are completed, your PowerEdge server will be ready to be monitored by OMSA and you should be able to run DSU (available on RHEL only) to upgrade the system firmware.
The apt repositories for Ubuntu Server are not yet supported by Dell, however, they have been available for years and have proven very useful for customers. Though the Ubuntu repositories should also work on Debian Wheezy and Jessie, I didn’t add support for Debian in this role but I will as soon as I have verified that it works.
Please note that this Ansible role is not supported by Dell, it is provided as a convenience to all our customers who use Ansible playbooks to manage their IT infrastructure. To report any problems, please submit an issue on the GitHub repository site.
Next: Ansible vs. Puppet
In my next Ansible blog, I will do a high-level comparison of Ansible vs. Puppet and explain which configuration management solution might be better suited for your environment.