~/sylvain.dev : home FR

Configuring a server with Ansible

Written in 2018: some details may have changed since.

Source code (GitHub)

Visit the Ansible website

I built this personal project to get familiar with Ansible and be able to recreate an identical server without any human intervention.

Ansible seemed like an interesting choice because it doesn’t require installing an agent on the target server to deploy to it. Only Python is required, and most Linux servers, if not all of them, ship with Python out of the box. On top of that, playbooks (sets of instructions) are written in YAML, which is easy to read and write.

I tried to make the various playbooks as modular as possible, so that adding features stays simple.

This project lets you:

  • Deploy a server and secure it with SSH keys, Fail2Ban and iptables.
  • Deploy some of the applications I built during my studies (to try out several kinds of deployment, whether PHP or NodeJS applications)
  • Set up monitoring with Monit
  • Automatically configure a web server (Nginx) and request HTTPS certificates from Let’s Encrypt, renewals included.

The project isn’t finished yet: for instance, backing up and restoring the data of the installed applications still needs to be handled. You can contribute to the project here.

Go to a page