Managing your Ansible Environment with Galaxy
Ansible is known for its simplicity, lightweight footprint and flexibility to configure nearly any device in your infrastructure. Therefore it’s used in large scale environments shared between teams or departments. This leads to even bigger Ansible environments which need to be tracked or managed in version control systems like Git. Mostly environments grow with their usage over time, in this case it can happen that all roles are managed inside one big repository. Which will eventually lead to quite messy configuration and loss of knowledge if roles are tested or work the way they supposed to work. Ansible provides a solution which is called Galaxy, it’s basically a command line tool which keeps your environment structured, lightweight and enforces your roles to be available in a specific version. First of all you can use the tool to download and manage roles from the Ansible Galaxy which hosts many roles written by open-source enthusiasts. 🙂 # ansible-galaxy install geerlingguy.ntp -v Using /Users/twening/ansible.cfg as config file - downloading role 'ntp', owned by geerlingguy - downloading role from https://github.com/geerlingguy/ansible-role-ntp/archive/1.6.4.tar.gz - extracting geerlingguy.ntp to /Users/twening/.ansible/roles/geerlingguy.ntp - geerlingguy.ntp (1.6.4) was installed successfully # ansible-galaxy list # /Users/twening/.ansible/roles - geerlingguy.apache, 3.1.0 - geerlingguy.ntp, 1.6.4 - geerlingguy.mysql, […]