Intro to Event-driven Ansible for IT automation
Advancing innovation using automation
Many companies are striving to use automation more strategically across their organizations. Automating IT functions is key to their success. In fact, 451 Research found that 20% of surveyed companies expect their IT processes will be automated in the next year.1 But the heightened focus on automation is more than a trend. As companies strive to deliver such solutions that drive business success, they must also find ways to free up staff to focus on these projects that will be deployed across the hybrid cloud.
Advanced automation helps teams achieve their innovation goals by automating routine and repetitive tasks that interfere with top priorities. For example, there may be a key technology that requires continual management or support. Left to manual methods, this can take time and slow delivery of new applications. Automation frees teams from routine tasks and helps them better manage complexity so they have more time to deliver new applications and capabilities more quickly.
IT service management (ITSM) is another area where advanced automation can be applied. Resolving trouble tickets is often an urgent task, yet manual troubleshooting methods, multiple hand-offs, and information gathering slow the process, all while business may be interrupted. What if basic troubleshooting steps and information gathering were fully automated? This would expedite resolution and minimize the number of hand-offs while reducing mean-time-to-resolution (MTTR).
Assess the role of automation in your organization:
- What is the impact of an outage and how fast can you recover?
- Howconfident are you that changes are made consistently across the operation according to your standards?
- How much time are you spending on high volume, yet low level tasks?
- How many issues are caused by human error?
- How often are you sorting through complexity in order to resolve an issue or perform a task?
- How fast can you respond to a security risk?
Companies are accelerating their migration to hybrid cloud architectures and cloudnative computing and are increasing spending on IT infrastructure automation and orchestration, according to 451 Research.1
Event-driven automation
Event-driven automation is the next step in the journey to end-to-end automation. It answers the need to connect intelligence, analytics, and service requests for an environment to automated actions so that activities can take place in a single motion. This model is ideal for high-volume, routine tasks as well as ITSM actions and more.
The benefits of event-driven automation are far-reaching and include the ability to manage massive amounts of complexity across clouds, the multidevice remote workforce, and growing edge implementations. For many businesses, maintaining resilience and reliability is essential and event-driven automation helps teams meet these needs while working around resource constraints and skills gaps.
Defining event-driven automation
So what exactly is event-driven automation and how is it different from the automation that is already widely adopted? Event-driven automationworks by allowing for a predefined and automated response when a certain type of event occurs. For example, in a typical IT operation, a system outage can send an alert (i.e., an “event”) that automatically triggers a specific action such as logging a trouble ticket, gathering the facts needed for troubleshooting, or performing an action such as a reboot—all without manual steps. In a similar way, event-driven automation can help teams respond to a variety of additional “Day 2” operational needs such as configuration management, edge device management, provisioning, user management, tuning, scalability, and more.
Event-Driven Ansible is a highly flexible solution that is used to create advanced end-to-end automation scenarios for a wide variety of needs across your IT operation. It is designed for simplicity and ease of use similar to Red Hat® Ansible® Automation Platform. For example, you can use familiar YAML to create Ansible Rulebooks which are similar to Ansible Playbooks but use “if-then” scenarios instead.
How is Event-Driven Ansible different?
Until now, most event-driven and custom-developed automation projects have been complex and time consuming to deliver because much of the solution is developed to meet a singular need. For example, you can automatically shut down network firewalls when certain activity patterns occur, then notify responsible teams. This is a useful and essential solution, but is limited to this specific need.
Event-Driven Ansible is designed to be more flexible than this option, with faster and more cost-effective ways to stand up new automation projects across any use case. By writing an Ansible Rulebook and allowing Event-Driven Ansible to subscribe to an event listening source, your teams can reduce the time it takes to automate a variety of tasks across the organization.
Think of it like a crescent wrench: a single tool that is easy to adjust to different size bolts. The same idea applies here—a single automation tool that addresses a broad variety of IT automation needs.
Business benefits of Event-Driven Ansible
Many customers are on a journey toward a fully automated enterprise. Red Hat Ansible Automation Platform, along with Event-Driven Ansible, helps you automate the processes that matter to you.
Automated remediation
Connect the analytics or tickets that tell you there’s an issue to automated troubleshooting steps that resolve the issue, such as a reboot or reset of a device or server. You can also create automation thatidentifies an outlying event and automatically generates a service ticket in your ITSM solution if you prefer. Event-Driven Ansible can proactively remediate issues based on known system behavior patterns, or respond to low capacity or scalability monitoring events (alerts). As IT teams move away from an “interrupt-driven” style of working on issues, event-driven automation helps teams to focus on key priorities instead of repetitive work.
Ticket enrichment
A common issue with ticket management is that tickets do not provide enough information to provide effective root cause analysis (RCA). Event-driven automation patterns can be utilized to communicate with relevant systems so corresponding tickets can be updated with rich detail to provide better RCA.
IT resilience, risk mitigation, and stability
Reliability and resilience are often key concerns for IT leaders and event-driven solutions can help you get ahead of risks. Whether you need to quickly address a common outage, proactively watch for signs to prevent an outage, or respond to security risks before your environments are adversely impacted, event-driven automation can help you boost IT resilience.
Reducing toil across IT operations
In addition to these use cases, event-driven automation can also be used to reduce those high-volume tasks that are repeated often as part of IT operations. Look at which tasks are performed many hundreds or thousands of times across your organization as candidates to automate. This could be management of storage or capacity associated with a key application, continual tweaks to a key underlying technology, proactively addressing security risks, and more.
Applying event-driven automation
With the important benefits that can come from event-driven automation, let’s explore some ways you can get started. Event-Driven Ansible is flexible from source to rule to action and this allows it to be used in any IT domain. The following use cases highlight where to apply Event-Driven Ansible.
How Event-Driven Ansible works
Event-Driven Ansible connects sources of events with corresponding actions using rules. Its decision-making capabilities receive an “event” from a monitoring tool and trigger the required action. Ansible Rulebooks define the source of the event and explain the action to take—in the form of “if-this-then-that” instructions—when the event is encountered. Ansible Rulebooks map event conditions to an action, like running a playbook or directly executing a module as illustrated in Figure 1.
For example, if your event source is watching network routers and discovers that a router is not responding, it recognizes this as an event. Event-Driven Ansible receives this event and matches the event to the condition defined by the rule in theRulebook,which in this casewould be when an event indicating “no response” is encountered, reset the router. Event-Driven Ansible triggers the instructions in the Rulebook and the router is reset, restoring it to normal function. This can happen at any time, day or night, even when the network engineer is asleep.
Event-Driven Ansible is comprised of three main components:
Sources
These define which event source plugins will be used. Commonly these are monitoring tools, but can also be custom integrations you create to any event source important to you. These source plugins are created by partners, the Ansible community, Red Hat or you. There are some common source plugins that are available already, including: webhooks, Kafka, Azure service bus, file watch, url_check, Prometheus alertmanager, and others, including partner-specific plug-ins currently being created.
Rules
These define conditionals that will be matched from the event source. Should the condition be met, an action can be triggered.
Actions
An action triggers what needs to happen should a condition be met. Some of the current actions are: running a playbook, running a module, setting a fact, posting an event, or debugging. The rules will look for certain situations where specific conditions are met and then will kick off an action to address the “event” for which the decision system has identified a required action, as illustrated in Figure 2.
Event-driven automation in your multivendor environment
Any event-driven solution must be able to work within multivendor environments. Red Hat works collaboratively with partners including those who offer monitoring and observability tools to advance event-driven automation solutions. This helps to create event=driven automation more quickly across all IT departments including infrastructure, networks, cloud, edge, security, and more.
Event-Driven Ansible begins with a set of Event-Driven Ansible plugins and rulebooks for organizations to use, called Ansible Content Collections, including partner-developed content that can help jumpstart new event-driven automation projects.
What are Ansible Content Collections and why do they matter?
nsible Content Collections is the term we use for packaged automation content (modules, plugins, Ansible roles, documentation, test scripts, and more) so that organizations can download and use them to initiate new automation projects, including those using an event-driven automation model. Red Hat Ansible Certified Content Collection is trusted content available to Ansible Automation Platform subscribers which Red Hat has certified and is supported by Red Hat and its partners.
Start small. Think big.
Red Hat often recommends a start small, think big approach to automation, and Event-Driven Ansible is no exception. If you are learning how Event-Driven Ansible works, we suggest some simple use cases, such as gathering facts. From there you can grow your use of this automation to more sophisticated automated actions and broader applications across your operation—from network to infrastructure to cloud and DevOps, and more.
What technologies are needed for event-driven automation? At the highest level, all teams will need to determine which use cases to automate, then write rulebooks to execute the automation. If you are an Ansible Automation Platform customer, you can call playbooks within your new Ansible Rulebooks to build on your trusted automation. Red Hat consulting and training services, as well as services from partners, are available to help you quickly implement automation so you can realize benefits even more quickly.
Learn more
Whether you’re beginning your automation journey or have been using automation for years, there are a variety of resources to advance your automation knowledge. Event-Driven Ansible is part of Red Hat Ansible Automation Platform, making this trusted enterprise automation platform even more powerful in handling new types of automation needs. Discover how event-driven automation with Red Hat Ansible Platform technology works and understand how you can apply it to your IT operational challenges. Learn at your own pace and use this solution to streamline work and deliver better IT end-user experiences.
Learn more at ansible.com/event-driven-automation
Discover how event-driven automation can improve IT operations
451 Research. “The Impact of Event-Driven Automation on IT Operations,” October 2022.