I've been using SaltStack a lot in my previous job, and loved its event driven model. Now, in my new job, we are using Ansible, and definitely not in an event driven model.

I was wondering if there was this capacity hidden (or not hidden :)) anywhere in Ansible ?

Also if you think that it was a good idea to try and implement this event driven model based on Ansible (or if Ansible was not designed to be used like this and it would be an mistake).


[EDIT] I got what Arcege is telling me, my question was if there was an event-driven sub-system in Ansible : The answer is NO.

So my second question is : What event system would you plug into Ansible in order to get a truly automated infrastructure ? (e.g. Kafka)


I can't say that I've used SaltStack, but I have a good deal of experience with Ansible. The two are different approaches. Event based use is not hidden, it is just not there by itself.

Ansible is agent-less (no minions), and as such it relies on a management system to be able to control. This adds flexibility on how to manage events, where they come from, how they are raised and what to do in an automated fashion. This means that it can be used for provisioning through CI/CD, fixing faults through a monitoring system, combined with a server agent like Telegraf.

The questions I think that should be asked is: what would trigger the tool, where it should run and what should be performed. The rest is just getting the right tools to link up. Generally, it will involve a CI/CD system, but there are plenty of those.

Some example uses cases:

  • detecting a flake in a build on a bare-metal server in a pipeline, triggering to re-provision the server.

  • a trigger coming from the PR system, to start a build to update test servers.

  • Telegraf detects a disk issue, which triggers an alert which can then start a build to resize the disk or provision a larger server and transfer services there.

Except for the Telegraf use case, the events are likely coming from sources other than the agent running. And then with the Telegraf case, the option of provisioning a different server would be outside the scope of SaltStack.

To answer your last question of even to use a event-driven model, it's a matter of necessity and choice depending on the use cases.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.