In complex IT environments there is no getting around the automation of tasks. This not only saves time and money, but above all reduces the human error rate when executing even small tasks. Automation of tasks thus increases security and allows IT departments more flexibility in the job.

Those who use Ansible for configuration management do not need to install any additional client software. Because the connection is established with Secure Shell SSH (secure and simple). Ansible is therefore only installed on one server and only SSH access is required for administration on the clients.

Ansible Playbooks

In Ansible, the configurations to be done are stored in so-called Playbooks. Ansible Playbooks are a way to send commands to the client in a script-driven way.

So you don’t have to execute the commands individually in a shell, but can configure complex environments remotely. Simply by specifying the required commands in a YAML file.

A Play contains concrete tasks to do (e.g. create user, start service etc.). A Playbook consists of several combined Plays.

Ansible Playbook Roles

In an Ansible Playbook you basically write everything you want the system to be. You often outsource recurring elements to Playbook roles. By the way, grouping content by roles makes it easy to share (share) with other users.

Where we are already with the topic. We do not only take over the configuration with Ansible, but also provide our customers with finished Ansible Playbooks. We would like to draw your attention to the following three Playbooks:

Ansible Playbook: Backup

For daily, weekly or monthly backups of files, MySQL databases and PostgreSQL databases. Backup rotation e.g. Grandfather-father-son possible. OS: Debian and Ubuntu.

Ansible Playbook: Drupal (for Drupal 7 and Drupal 8)

Helps with rollout execution (only code rollout with optional Drush commands as pre and/or post_commands). And a Git Pull to update the code base. It runs Drupal cron with drush and Drupal schedule-cron with drush. OS: Debian and Ubuntu.

Ansible Playbook: SSH

SSH server with SSH key management (private key, authorized key) and known_hosts support. OS: Debian and Ubuntu.

In a complex IT environment, even the smallest tasks can last forever. Sprawling systems (a multitude of servers) are difficult to develop, implement and maintain. Business requirements also increase complexity and IT teams are increasingly struggling with administration, availability and rising costs. The Ansible Playbooks mentioned here can be downloaded from Ansible Galaxy. They help to better organize and automate your system configuration tasks. Further information can also be found on our theme page: Ansible.

Playbook Scripting

By the way, we work with a corresponding editor which helps to observe the correct distance in the Yaml syntax and to avoid mistakes. For example, if you use Atom as Editor like we do and extend it with plugins (e.g. ansible-lint, linter-ansible-linting), it’s easier to avoid syntax errors or to detect them quickly.