Power Business Continuity and Automation

Power Business Continuity and Automation

Connect, learn, and share your experiences using the business continuity and automation technologies and practices designed to ensure uninterrupted operations and rapid recovery for workloads running on IBM Power systems. 


#Power
#TechXchangeConferenceLab

 View Only

AI-Powered Automation: Ansible Lightspeed

By Shreyansh Chamola posted 3 days ago

  

Ansible provides simple and powerful Automation for cross-platform computer support, enabling users to perform repetitive tasks like cloud provisioning, configuration management, application deployment and much more with ease.
But to make use of this powerful software, users need to have knowledge about the available functionalities (modules, roles, etc.) present in any collection, and how to use them while writing tasks in a playbook, which gets used for automating the task(s) that they want to automate.
These requirements, at times, create a gap because of which not many users are able to make full use of Ansible, therefore, reducing its adaptability.
But, Not Anymore!

With the recent advances in Generative Artificial Intelligence and its implementation in the form of Ansible Lightspeed, it has now become easier than ever to use Ansible and add it into your automation environment.


What is Ansible Lightspeed?

Red Hat Ansible Lightspeed is a generative AI service available to Red Hat Ansible Automation Platform users.
Making use of IBM Watsonx code assistant’s automation-specific foundation models, it uses natural language processing to turn prompts written in plain English into code snippets for the creation of Ansible playbooks.

The generated content adheres to accepted Ansible best practices and, when combined with the Ansible code bot, helps teams build more confidence in their automation code base.

Ansible Lightspeed can also be used for understanding the details of any playbook.

This becomes helpful in bridging the gap in terms of required skills and democratizes automation, enabling users of all skill ranges to make use of Ansible in their environment with ease, increasing their productivity and efficiency.

How Ansible Lightspeed Makes AIX Automation Easier

Ansible Lightspeed makes AIX automation easier and faster by helping users quickly generate tasks for the power_aix collection.

Whether you're managing LKU updates, applying patches, installing filesets, or handling LPAR and system configuration, Lightspeed can turn simple natural-language requests into ready-to-use Ansible tasks. It reduces the need to look up module parameters, helps explain errors, and guides you toward best practices, making AIX automation more accessible for both new and experienced admins.

By simplifying common AIX operations, Lightspeed saves time and helps teams build consistent, reliable automation workflows.


How to use Ansible Lightspeed?

Now that we are aware of what Ansible Lightspeed is, let’s see how to use it in your environment for generating playbooks.

Prerequisites:

  • To use Ansible Lightspeed, you need to have subscription of Ansible Automation platform and IBM Watsonx code assistant.
  • You need to have VS Code installed on the machine that you want to generate playbooks on.

When all the prerequisites are met, you can move forward with creating the environment.

Steps for creating the environment for Ansible Lightspeed:

  1. Search for the latest version of “Ansible” extension available on VS Code and install it.
    Note: Check that the author is “Red Hat”
    A screenshot of a computer

Description automatically generated
  2. Enable all the settings related to Ansible Lightspeed and make sure that Ansible extension points to the correct link for Ansible Lightspeed
    A screenshot of a computer

Description automatically generated
  3. Connect your Red Hat account associated with Ansible Lightspeed to the VS code Ansible extension and authorize Ansible Lightspeed for VS Code.
    Note: it may ask you to connect Ansible extension to your GitHub account.
    A screenshot of a computer

Description automatically generated
    A screenshot of a computer

Description automatically generated

Once all this is done, you should be able to use Ansible Lightspeed.

Using Ansible Lightspeed:

Now that the required setup is done, you can easily generate tasks or playbooks as per your requirements.

  1. Create a playbook and write the boiler plate code.
    A screenshot of a computer

Description automatically generated
  2. Next, provide a prompt based on what you want to achieve.
    Example: If you want to create a JFS2 filesystem called “testfs” on AIX, you can provide a prompt like this:
    Create a JFS2 filesystem in AIX called testfs, use ibm.power_aix collection.
    A black screen with white text

Description automatically generated
  3. When you press Enter, lightspeed will start processing and after some time it will generate the task, like this:
    A black screen with white text

Description automatically generated
  4. You have the choice to approve, decline or edit the provided results as per your requirements.
    If you press Enter, it will add the generated code to your playbook.
    A black screen with white text

Description automatically generated


Just like this, you can utilize Red Hat Ansible Lightspeed for generating tasks/playbooks and automating your day-to-day work using Ansible.

Furthermore, if you want to get detailed explanation about a playbook, right-click on the playbook while inside VS Code and click on “Explain the playbook with Ansible Lightspeed”. In some time, Lightspeed will generate a detailed explanation about the playbook for better understanding Its usage.

You can also do model customization which allows Ansible Lightspeed users to use their existing Ansible content to train the model. This feature can help to improve the quality and accuracy of your Ansible content with code recommendations that are more tailored to your organizations' specific needs and automation patterns.

Conclusion

In the age of Artificial Intelligence, Red Hat Ansible Lightspeed stands out as a powerful tool that helps bridge the skills gap often associated with learning and using Ansible. By simplifying automation development, it enables more users to adopt Ansible for their day-to-day tasks, improving both efficiency and productivity.

With Lightspeed now trained on most of the POWER collections - including the power_aix Ansible collection - users can easily generate playbooks to automate nearly all supported AIX operations. Whether it's patching, performing LKU, retrieving logs, or handling other system tasks, the solution is now just a prompt away.
Happy Automation!


To read more about Ansible Lightspeed, check out these links:

RedHat Ansible Lightspeed official webpage

Watsonx code assistant and Ansible Lightspeed

RedHat blog - Getting started with Ansible Lightspeed


Hope you enjoyed this blog, Happy Automation!

0 comments
5 views

Permalink