Beginning with Red Hat Ansible Lightspeed featuring IBM Watsonx Code Assistant

Share it

Message from the publisher: This article was initially posted in November 2023 and has been revised by the writer.

The previous year, we introduced Ansible High-velocity with IBM Watson Code Assistant, a novel generative AI facility within Crimson Hat Ansible Automation Platform. Ansible High-velocity with watsonx Code Assistant is designed to support automation teams produce, accept, and preserve Ansible content more effectively.

Let’s delve into the guidelines to set up Ansible High-velocity with IBM watsonx Code Assistant for your establishment. We’ll explain how end users can establish the service in their Visual Studio Code (VS Code) environment. We’ll also provide insights into what to anticipate from the experience and additional tools accessible to supercharge your Ansible creator expedition with generative AI capabilities established on a basis of transparency, precision, and choice.

This is a thrilling addition to the Ansible Automation Platform journey, so let’s start things off.

Introducing AI to Ansible content generation through collaboration between Crimson Hat and IBM

Ansible High-velocity with watsonx Code Assistant embodies the synergy of Crimson Hat and IBM teams to form a unified AI experience for Ansible content creation. Leveraging automation-specific IBM watsonx foundational models, it transforms text prompts into Ansible content snippets for crafting Ansible content. The produced content complies with recognized Ansible best practices and, coupled with the Ansible code bot, aids teams in constructing more credible automation code.

The service comprises three elements:

  1. The developer interface – Constructed directly into the VS Code extension through the Ansible extension, this empowers Ansible content creators to employ natural language prompts in the Ansible Playbooks or task files to produce Ansible High-velocity single and multi-task recommendations.
  2. The integrated service – This acts as the connector or intermediary between the developer interface and the service. It introduces AI capabilities to Ansible Automation Platform and enriches the responses from the AI with its post-processing capabilities.
  3. The AI – IBM watsonx Code Assistant facilitates entrance to Ansible-specific foundational model that generates Ansible content suggestions. This constitutes the “AI essence” of the solution.

Ansible High-velocity with watsonx Code Assistant can be implemented in a software-as-a-service (SaaS) deployment or on-premises in your datacenter.

Register for Ansible High-velocity with watsonx Code Assistant – SaaS deployment

To connect to the SaaS version of Ansible High-velocity with watsonx Code Assistant, you must:

  1. Possess an active Ansible Automation Platform subscription OR
  2. Enroll in a trial subscription to Ansible Automation Platform.


  1. Sign up for IBM watsonx Code Assistant by selecting one of their subscription plans.

Observation: Present IBM watsonx Code Assistant subscribers and Ansible Automation Platform clients should trail these instructions to associate Ansible High-velocity to watsonx Code Assistant.

Upon finishing the steps in your IBM Cloud account, you will obtain an IBM watsonx Code Assistant (WxCA) API key and Model ID which can then be applied to merge the Ansible High-velocity service with your IBM watsonx Code Assistant instance.

Register for IBM watsonx Code Assistant for Ansible High-velocity – On-premises

For entities in sensitive industries with data confidentiality requisites or enclosed environments, both the Ansible High-velocity service and the watsonx Code Assistant comprehensive language model are now acquirable for on-premise deployment. This enables Ansible Automation Platform customers more dominion over their data and abides by conformity with enterprise security practices.

To connect the Ansible High-velocity service on-premises, you will require:

  1. Ansible Automation Platform 2.4 or higher
  2. Crimson Hat Openshift to execute the Ansible High-velocity service

To connect watsonx Code Assistant on-premises, you will need:

  1. IBM watsonx Code Assistant (WCA) on-premises and hosted on Cloud Pak for Data.
  2. For other system prerequisites and pricing for on-premise installations of watsonx Code Assistant, kindly reach out to IBM.

Logging in and connecting  Ansible High-velocity to watsonx Code Assistant

NOTICE: This segment is established for organization administrators with privileges to the Crimson Hat customer portal account for your organization. For all other users, proceed to the subsequent section for guidelines on connecting the VS Code extension for Ansible.

As Crimson Hat customer portal administrator, you must configure Crimson Hat Ansible High-velocity to pair with your IBM watsonx Code Assistant instance. This arrangement enables Crimson Hat Ansible High-velocity to communicate with your IBM watsonx Code Assistant instance.

You require the subsequent IBM watsonx Code Assistant details to connect Crimson Hat Ansible High-velocity:

  • IBM watsonx Code Assistant (WxCA) API key
    • A WxCA API key certifies all requests made from Crimson Hat Ansible High-velocity to IBM watsonx Code Assistant. Every Crimson Hat organization with a valid Ansible Automation Platform subscription must hold a set-up WxCA API key. When an authenticated Crimson Hat Single Sign-On (SSO) user inquires Crimson Hat Ansible High-velocity for advice, the WxCA API key associated with the user’s Crimson Hat organization is employed to authenticate the request to IBM watsonx Code Assistant.
  • Model ID
    • An exclusive WxCA model ID designates an IBM watsonx Code Assistant model in your IBM Cloud account. The model ID configured in the Crimson Hat Ansible High-velocity administrator portal is utilized as the default model, hence it will be utilized to obtain advice from Ansible High-velocity for all the users in your organization who are allocated a seat. This single-tenant IBM watsonx Granite model is distinct to your organization for enhanced data privacy, conformity, and security. These models are provided, managed, and preserved by IBM.

ATTENTION: You must set up both the WxCA API key and the model ID when initially setting up Crimson Hat Ansible High-velocity.


  1. Log in to the Ansible High-velocity portal as an organization administrator.
  2. Click Log in > Log in with Crimson Hat.
  3. Enter your Crimson Hat account username and password.

The Ansible High-velocity service utilizes Crimson Hat Single Sign-On (SSO) for verification.

As part of the validation process, the Ansible High-velocity service confirms if you are an organization administrator and if your organization possesses a valid Ansible Automation Platform subscription. Upon successful validation, the login screen is presented alongside your username and your assigned user role.

  1. From the login screen, click Admin Portal. You are directed to the Ansible High-velocity with watsonx Code Assistant administrator portal that is utilized to pair Crimson Hat Ansible High-velocity with your IBM watsonx Code Assistant instance.
  2. Set the API key of your IBM watsonx Code Assistant instance and tap Save.

    Optional: Tap Test to check the API key

  3. Set the model ID of the model you intend to use and tap Save.

    Optional: Tap Test to check the model ID.

Once the WxCA API key and model ID are appropriately verified, Ansible High-velocity is associated with your IBM watsonx Code Assistant instance.

ATTENTION: As an organization administrator for your Crimson Hat account, you can create and administer users. Refer to this link for additional information.

Setup and arrangement


  • Visual Studio Code and Ansible set up on your workstation
  • A Crimson Hat customer portal account (linked to your organization)


  • Install the Ansible VS Code extension from the Visual Studio Code Marketplace by searching for “ansible” and opting for the extension issued by Crimson Hat. Minimum version for the Ansible extension to function with Ansible High-velocity service is 2.8.108, check version history here.
  • Enable the Crimson Hat Ansible High-velocity service within the extension by accessing the “Extension Settings” via the gear icon.
  • In the settings, activate both “Ansible High-velocity enabled” and “Enable Ansible High-velocity with Watson Code Assistant inline suggestions” checkboxes.

ATTENTION: You can activate Ansible High-velocity in the “User” or “Workspace” settings, predicated on your choice. Extended information on VS Code User and Workspace settings can be located in their documentation.

Installation of the Ansible Visual Studio Code extension

  • Tap on the Ansible “A” in the VS Code activity bar on the left side of your editor to launch the extension.
  • Tap “Connect” and adhere to the instructions to log into your Crimson Hat account using your credentials.
  • Subsequently, authorize Ansible High-velocity for VS Code by tapping “Authorize”.
  • Obey the browser directives to revert back to VS Code, and finally, tap “Open” in the VS Code confirmation dialogue box.


Log in using your Crimson Hat credentials

You can affirm that Ansible High-velocity is activated by examining the VS Code status bar at the base of the editor window.

Ensure a Python environment is picked and your Ansible YAML files are affiliated with the Ansible language. Additional details on VS Code languages can be found in their documentation.


Generate an Ansible Playbook

Ansible High-velocity with watsonx Code Assistant endorses complete playbook crafting and content elucidation. You should possess the most recent version of the Ansible VS Code extension (>=24.8.0) to seize these attributes.

To commence, tap on the Ansible icon in the left-side navigation and then hit the ‘Get Started’ button under the Ansible Content Creator. Opt for “Playbook Generation with Ansible High-velocity” to enter the guided chat interface for full playbook design.

In the interface, input your playbook prompt in natural language and hit “Analyze”. The service will provide an editable outline of tasks (pseudo code). This chat-style interface enables real-time engagement with the generative AI service where you can refine your prompt. Both the playbook objective and outline are transmitted to Ansible High-velocity with watsonx Code Assistant, which proposes a comprehensive playbook. This intuitive and assisted experience aids novice to intermediary users in designing full Ansible Playbooks employing generative AI.

Content explanation

The Ansible VS Code extension also offers the capability to elucidate existing and freshly created playbooks so you can effortlessly grasp the specifics of any playbook. To explain any playbook, open it in VS Code and hit ‘Explain the current playbook’ under the Ansible High-velocity section. You can also right-click on a playbook and select “Explain the playbook with Ansible High-velocity”.

playbook generation

Ansible High-velocity full playbook generation and explanation.

Alongside complete playbook generation and playbook elucidation, Ansible High-velocity also provides more detailed control over the creation process through features such as single and multi-task generation.

Single and multiple task generation

When you necessitate adding particular inline tasks to your playbooks, Ansible High-velocity excels with its single and multi-task generation capabilities.

Single Task Generation:

  • Initiate a new task in your playbook and specify a name using the name argument.
  • Position your cursor at the conclusion of the task name and press “ENTER” to acquire a suggestion from Ansible High-velocity.

Multi-task Generation:

  • Construct a comment line at the task block level in your playbook.
  • String multiple natural language prompts together using ampersands (&).
  • At the termination of the comment line, press “ENTER” to receive a multi-task suggestion from Ansible High-velocity.

These attributes streamline the process of crafting detailed, multi-step workflows in your Ansible Playbooks, enriching efficiency and uniformity.

single task

Generating an Ansible task.

🤞 Don’t miss these tips!

🤞 Don’t miss these tips!

Solverwp- WordPress Theme and Plugin