Ansible Icinga Collection

16 July, 2026

Dirk Wening
Dirk Wening
Technical Writer

by | Jul 16, 2026

Last updated: July 16, 2026 · Reading time: 4–6 minutes

With Ansible and Icinga, you can automate the setup of your entire monitoring environment. The ” netways.icinga ” collection brings together eight roles that handle exactly these recurring steps for you. We’ll show you what the Collection can do, where its limitations lie, and how to set up a test environment in just a few minutes using the Full-Stack Playbook.

Introduction to the Collection

If you run a monitoring system like Icinga, you know the drill: a master here, a few satellites there, plus agents on every monitored host, a web interface, a database, and the cache backend. Installing and configuring everything manually is tedious, error-prone, and difficult to reproduce. This is exactly where the Ansible Collection netways.icinga comes into play.

In a nutshell

With the netways.icinga Collection, you can set up your entire Icinga environment. From a bare-bones system all the way to IcingaWeb2, including Director.

What problem does it solve?

Automating your Icinga installation is made much easier by the included roles. Instead of manually replicating each step on every host, the collection handles the repetitive tasks for you.
Here’s how to integrate repositories. Monitoring plugins are installed, and Icinga2 is set up.
Essentially, the collection currently consists of eight rolls:

  • netways.icinga.repos – manages the package repositories and serves as the foundation for everything else.
  • netways.icinga.icinga2 – installs and configures your Icinga 2 instances (Master, Satellite, Agent). The centerpiece of the collection.
  • netways.icinga.icingadb – sets up IcingaDB, the modern data backend.
  • netways.icinga.icingadb_redis – Installs Redis as the cache backend for IcingaDB.
  • netways.icinga.icingaweb2 – Installs and configures Icinga Web 2 along with its modules.
  • netways.icinga.monitoring_plugins – installs the monitoring plugins on the system.
  • netways.icinga.ifw – Icinga for Windows, for integrating Windows hosts as well.
  • netways.icinga.icinga_kubernetes – Integration with Kubernetes environments.

In addition, there is an inventory plugin (netways.icinga.icinga) that allows you to use Icinga itself as a dynamic inventory source for Ansible.

Who is it intended for?

For anyone who runs enough Linux systems that they don’t want to mount 100 servers one by one manually. The more hosts you have, the greater your profit. You can also use the ifw (Icinga for Windows) role to include Windows hosts in the monitoring. However, your Icinga Master itself only runs on Linux.

How does it work, in general?

Each role covers one component and can be considered on its own. Above all, the Collection makes collaboration easier. You decide whether a host becomes a master or an agent by configuring the Icinga 2 API feature. This role provides you with more guidance than just the feature configuration described in the Icinga documentation. For example, the role as “Master” or “Agent” and the certificate name, which you control directly through the role parameters.

What exactly does that do for you?

The benefits lie primarily in two things: a simplified and repeatable installation, and the ability to easily connect many agents. The latter, in particular, is worth its weight in gold in practice. It saves you a tremendous amount of time and requires very little configuration, because the same steps can be applied across your entire inventory.

The obvious advantage is that it simplifies the initial configuration. What used to involve many manual and error-prone steps is now contained in reusable roles. However, there are also some weaknesses you should be aware of. A configuration error affects all the machines in question. The same automation that speeds up deployment also spreads errors quickly and widely.

Even if Ansible runs without any issues, that doesn’t necessarily mean your Icinga configuration is complete and correct. It can happen that, even though the configuration is applied correctly, it ultimately has no meaningful effect. To use roles effectively, you’ll need a certain amount of knowledge about Icinga 2. The Collection takes the manual labor off your hands, but it doesn’t take away your understanding of what you’re actually building.

Wouldn’t it be better to automate this together?
Our consultants will set up an Ansible configuration for Icinga tailored to your environment, including handover and documentation.
Free Initial Consultation →

Installation

The easiest way is through Ansible Galaxy, where you can get the collection with just one command:

ansible-galaxy collection install netways.icinga 

Alternatively, you can also install it using the Git repository:

ansible-galaxy collection install git+https://github.com/NETWAYS/ansible-collection-icinga.git,0.4.6

The Full-Stack Playbook

The Collection includes a ready-to-use demo playbook. It sets up a complete master instance on a single host. So, Icinga2 with its own CA, IcingaDB, IcingaDB Redis, the database, Icinga Web 2, and the Director.

It’s important that you first properly add your target host to an inventory. To do this, create a file named inventory.ini. Make sure the host name always appears first at the beginning of each line:

[icinga]
dein-host ansible_hosts=deine.host.ip ansible_user=dein_user

Next, run the playbook and enter the hostname from your inventory using:

ansible-playbook -i inventory.ini netways.icinga.full_stack -e _target=<inventory_hostname des Zielhosts> --ask-become-pass

The–ask-become-pass flag is important here because the playbook installs packages and needs sudo privileges on the target host to do so. When you start Ansible, it asks you for the sudo password.

The Playbook is specifically intended as a test environment and runs on Debian/Ubuntu. Your login for Icinga Web 2 will then be admin/admin. It’s not intended for your production environment—for that, you’ll need to build your own playbook tailored to your environment.

Conclusion on the Ansible Icinga Collection

The netways.icinga Collection takes the tedious manual setup of Icinga off your hands and packages it into clean, repeatable playbooks. The added value isn’t just the time saved when setting it up for the first time, but also the fact that it can be replicated. Your monitoring infrastructure is available as code; it can be versioned and recreated identically at any time.

At the same time, the Collection is no substitute for knowledge of Icinga. It takes the manual labor off your hands, but not the understanding. If you keep that in mind, you’ll have an extremely useful tool at your disposal—one that really shines when you need to connect to a lot of hosts.

How did you like our article?