One of the big announcements from Redhat recently is the tech preview of Ansible Lightspeed, a new AI service around easing the process of creating your Ansible code.

What is Ansible Lightspeed?

Ansible Lightspeed is a generative AI tool designed to help with the creation of Ansible content. It is integrated directly into your VS Code editor via the Ansible VS Code extension. The AI functionalities are powered by IBM's Watson Code Assistant AI.

How to Install Ansible Lightspeed

To get Ansible Lightspeed up and running, ensure you have Visual Studio Code and Ansible set up on your computer and you're signed up on GitHub. Follow these steps:

  1. Go to the Visual Studio Code Marketplace and find the Ansible VS Code extension. Look for the one that's published by Red Hat and install it.
  2. Once installed, navigate to the "Extension Settings" by clicking on the gear icon. Here, you'll find the option to enable the Ansible Lightspeed service.
  3. In the settings, you'll see two checkboxes: "Ansible Lightspeed enabled" and "Enable Ansible Lightspeed with Watson Code Assistant inline suggestions". Make sure both are checked.
  4. Open the extension by clicking on the Ansible "A" icon in the VS Code activity bar on the left side of your editor.
  5. Click on "Connect" and you'll be prompted to sign in to GitHub. Use your GitHub credentials to log in.
  6. You'll be presented with the Ansible Lightspeed technical preview terms and conditions. Read through them and click on "Agree" if you're okay with the terms.
  7. The next step is to authorize Ansible Lightspeed for VS Code. Do this by clicking on "Authorize".
  8. You'll be redirected back to VS Code through your browser. Once you're back, click on "Open" in the VS Code confirmation dialog box.

Full details on the setup process can be found here: https://www.ansible.com/blog/welcome-to-the-ansible-lightspeed-technical-preview

How to Use Ansible Lightspeed

To use Ansible Lightspeed, you create a task with just the task name. Lightspeed will then autogenerate the task for you, which you can accept by hitting "TAB".

Is Ansible Lightspeed Free?

Yes, the technical preview of Ansible Lightspeed is available free of charge to all Ansible users. As more users engage with Ansible Lightspeed, the model's recommendations will continually improve based on the additional data available to the back-end AI models.

Ansible Lightspeed vs GitHub Copilot

Though both Ansible Lightspeed and GitHub Copoliot use AI to autogenerate code, a few differences are listed below.

Cost Code Support Source Citation Maturity
Ansible Lightspeed Free Ansible Playbooks Yes Early. Inconsistent use of modules used for network related tasks.
GitHub CoPilot Paid Multi-language support including Python, Ansible and many more. No Medium provides consistent generation for network tasks.

Takeaway

Ansible Lightspeed will develop over time. Plus, due to its free nature and openness to providing source code citations, I have no doubt Lightspeed will become a go-to tool for anyone working with Ansible automation in the not-so-distant future.

Ready to Master Network Automation? Start Your Journey Today!
Our membership provides:
  • Full deep-dive course library (inc. Batfish, pyATS, Netmiko)
  • Code repositories inc. full course code, scripts and examples
  • 24x7 multi-vendor labs (Arista, Cisco, Juniper)
  • Private online community
  • Live monthly tech sessions
  • Access to tech session library

Join Now ➜