Skip to main content
πŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy β€” plus the companion book on Leanpub & Amazon. Start Learning
Ansible Lightspeed Enterprise with IBM watsonx Code Assistant
Automation

Ansible Lightspeed Enterprise

Enterprise guide to Ansible Lightspeed with IBM watsonx Code Assistant. Deployment, custom model tuning, content attribution, and governance.

LB
Luca Berton
Β· 2 min read

The enterprise version of Ansible Lightspeed β€” IBM watsonx Code Assistant for Red Hat Ansible Automation Platform β€” is where things get serious. Custom model tuning on your playbooks, content attribution for compliance, and on-premises deployment for air-gapped environments.

I have deployed this for enterprise clients and here is what you need to know.

What Changes in Enterprise

FeatureCommunity LightspeedEnterprise (watsonx)
AI suggestionsBasicAdvanced with context
FQCN enforcementYesYes + custom rules
Content attributionNoYes (license tracking)
Custom model tuningNoYes (your playbooks)
On-premisesNo (cloud only)Yes (OpenShift)
Audit trailNoFull logging
Post-processingNoCustom rules engine
SupportCommunityRed Hat + IBM

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Your Environment                     β”‚
β”‚                                                   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ VS Code  │───▢│  Ansible Automation Platform  β”‚ β”‚
β”‚  β”‚ Extensionβ”‚    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚  β”‚  watsonx Code Assistant β”‚  β”‚ β”‚
β”‚                  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚ β”‚
β”‚                  β”‚  β”‚  β”‚  Granite Model   β”‚  β”‚  β”‚ β”‚
β”‚                  β”‚  β”‚  β”‚  (Fine-tuned)    β”‚  β”‚  β”‚ β”‚
β”‚                  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚ β”‚
β”‚                  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚ β”‚
β”‚                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The model runs inside your Ansible Automation Platform on OpenShift. No data leaves your network.

Deployment on OpenShift

Prerequisites

Install the Operator

# Create namespace
oc new-project watsonx-code-assistant

# Install the operator via OperatorHub
# Navigate to: Operators β†’ OperatorHub β†’ search "watsonx Code Assistant"
# Click Install β†’ select watsonx-code-assistant namespace

Deploy the Model Service

apiVersion: wca.ibm.com/v1
kind: WatsonxCodeAssistant
metadata:
  name: ansible-lightspeed
  namespace: watsonx-code-assistant
spec:
  license:
    accept: true
  model:
    name: granite-8b-code-instruct-ansible
    resources:
      limits:
        nvidia.com/gpu: "1"
        memory: "32Gi"
      requests:
        nvidia.com/gpu: "1"
        memory: "24Gi"
  storage:
    size: 50Gi
    storageClassName: gp3-csi
  replicas: 2

Connect to Ansible Automation Platform

# In the AAP configuration
ansible_lightspeed:
  enabled: true
  url: https://watsonx-code-assistant.apps.ocp.internal.com
  model_name: granite-8b-code-instruct-ansible
  auth:
    type: service-account
    secret: watsonx-sa-token

Custom Model Tuning

The killer feature: train the model on YOUR organization’s playbooks.

Prepare Training Data

# Export your best playbooks
find /path/to/ansible-repos -name "*.yml" -o -name "*.yaml" | \
  grep -v "molecule\|tests\|.github" | \
  head -5000 > training_files.txt

# The tuning pipeline expects:
# - Well-structured YAML
# - FQCN module names
# - Proper task naming
# - Consistent coding style

Run Tuning Job

apiVersion: wca.ibm.com/v1
kind: ModelTuningJob
metadata:
  name: custom-ansible-model-v1
spec:
  baseModel: granite-8b-code-instruct-ansible
  trainingData:
    source: pvc
    pvcName: ansible-training-data
    path: /data/playbooks/
  hyperparameters:
    epochs: 3
    learningRate: 1e-5
    batchSize: 8
  output:
    modelName: granite-8b-ansible-custom-v1
    pvcName: custom-models

Results I Have Seen

After tuning on 3,000 enterprise playbooks:

  • Module accuracy: 92% β†’ 97% (knows your custom collections)
  • Variable naming: follows your conventions (company prefix, etc.)
  • Role patterns: generates roles matching your directory structure
  • Error handling: includes your standard retry/rescue patterns

Content Attribution

Enterprise compliance teams love this feature. Every suggestion shows which Ansible Galaxy content or documentation influenced it:

{
  "suggestion": "ansible.builtin.dnf: name: nginx state: present",
  "attributions": [
    {
      "source": "ansible.builtin",
      "version": "2.16.0",
      "license": "GPL-3.0",
      "url": "https://galaxy.ansible.com/ansible/builtin"
    }
  ],
  "confidence": 0.94
}

This helps with:

  • License compliance β€” know what licenses your generated code carries
  • Audit requirements β€” trace every suggestion to its source
  • IP protection β€” ensure generated code does not contain proprietary content

Post-Processing Rules

Enforce your organization’s standards automatically:

# watsonx-rules.yml
rules:
  - name: enforce-fqcn
    description: All modules must use FQCN
    action: transform
    
  - name: ban-command-module
    description: Prefer specific modules over command/shell
    pattern: "ansible.builtin.command"
    action: warn
    message: "Consider using a specific module instead of command"
    
  - name: require-tags
    description: All tasks must have tags
    pattern: "missing:tags"
    action: add
    default_tag: "untagged"
    
  - name: naming-convention
    description: Task names must start with uppercase
    pattern: "^- name: [a-z]"
    action: transform

Governance Dashboard

The admin console provides:

  • Usage metrics β€” suggestions generated, accepted, rejected per user/team
  • Quality metrics β€” acceptance rate, edit distance after acceptance
  • Compliance status β€” rule violations, attribution coverage
  • Model performance β€” latency, accuracy trends over time

ROI Calculation

Based on enterprise deployments:

MetricBefore LightspeedAfter Lightspeed
Playbook writing time45 min avg15 min avg
Code review iterations3.2 avg1.8 avg
FQCN compliance60%99%
Onboarding time (new engineers)3 months6 weeks

For a 10-person platform team: ~$200K/year in productivity gains vs ~$50K subscription cost.

About the Author

I am Luca Berton, AI and Cloud Advisor. I deploy Ansible Automation Platform and watsonx Code Assistant for enterprise clients across Europe. Contact me to discuss your Ansible AI strategy.

Free 30-min AI & Cloud consultation

Book Now