AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

Connect the AAP Coding Assistant to Google Gemini: Setup Guide

By Luca Berton · Published 2024-01-01 · Category: installation

Step-by-step guide to connecting the AAP Coding Assistant VS Code extension to Google Gemini/Vertex under AAP 2.7's BYOM model support.

Red Hat Ansible Automation Platform 2.7 opens the Coding Assistant — the AI pair-programmer built into the Ansible VS Code extension — to Google Gemini and Vertex AI as a Bring Your Own Model (BYOM) provider. This was confirmed as part of the BYOM provider compatibility matrix presented at Red Hat Tech Day Netherlands 2026 in Bunnik on 3 June 2026. If your organization already standardizes on Google Cloud's AI stack, you no longer need to route Ansible content generation through Red Hat AI alone — you can point the Coding Assistant directly at your own Gemini or Vertex endpoint.

This guide walks through what BYOM means for the Coding Assistant specifically, how it compares to the other providers on the matrix, and how to configure the connection.

BYOM: Two Assistants, Two Different Support Timelines

AAP 2.7 ships two distinct AI surfaces, and it's important not to conflate them — they have different provider support timelines:

  • Intelligent Assistant — the chatbot embedded directly in the AAP web UI, used for querying documentation, troubleshooting job failures, and general platform Q&A.
  • Coding Assistant — the Ansible VS Code extension's inline suggestion and generation engine, used while authoring playbooks, roles, and collections.
The two assistants do not share a provider rollout schedule. Google Gemini/Vertex is available to the Coding Assistant now (AAP 2.6+), while it's still listed as "Coming Soon" for the Intelligent Assistant. If you've tried to wire Gemini into the AAP chatbot and hit a wall, that's expected — it isn't supported there yet. The VS Code extension is the correct, currently-supported integration point for Gemini.

See also: Connect the AAP Coding Assistant to IBM watsonx: Setup Guide

Provider Compatibility Matrix

Here's the full BYOM picture as presented at Red Hat Tech Day Netherlands 2026:

ProviderIntelligent Assistant (AAP UI chatbot)Coding Assistant (VS Code extension)
Red Hat AISupported (AAP 2.6+)Supported (AAP 2.6+)
OpenAISupported (AAP 2.6+)Coming Soon
Azure OpenAISupported (AAP 2.6+)Coming Soon
IBM watsonxNot supportedSupported (AAP 2.5+) — first external provider supported
Google Gemini/VertexComing SoonSupported (AAP 2.6+)
A few things stand out. IBM watsonx was the very first external (non-Red Hat AI) provider the Coding Assistant supported, arriving in AAP 2.5. Google Gemini/Vertex followed in AAP 2.6, making it currently the newest fully-supported external model for the coding side. Meanwhile OpenAI and Azure OpenAI — despite being live on the Intelligent Assistant since 2.6 — are still pending on the Coding Assistant. If your team is deciding which BYOM provider to standardize on for playbook generation today, watsonx and Gemini/Vertex are your two supported non-Red Hat AI options.

Prerequisites

Before connecting the Coding Assistant to Gemini, confirm the following:

  • You are running AAP 2.6 or later (Gemini/Vertex support for the Coding Assistant was introduced at 2.6 and carries forward into 2.7).
  • You have the Ansible VS Code extension installed and updated to a version that exposes the BYOM model provider settings.
  • You have a Google Cloud project with the Vertex AI API enabled, or a valid Gemini API key if you're connecting through the direct Gemini API rather than Vertex.
  • You have the necessary IAM permissions in Google Cloud to generate or manage service account credentials (if using Vertex) or an API key (if using the Gemini API directly).
  • Network egress from your development workstation (or wherever VS Code runs) to Google's API endpoints is permitted by your organization's firewall/proxy rules.

Configuring the Connection

At a high level, connecting the Coding Assistant to Gemini/Vertex follows the same BYOM pattern as watsonx: you register the external model as a credential/model source in the extension's settings, then select it as the active provider for code generation.

  1. Open VS Code and go to the Ansible extension settings.
  2. Under the AI/Coding Assistant model provider section, choose Google Gemini/Vertex as the provider type.
  3. Supply your authentication details:
  4. For Vertex AI: your GCP project ID, region, and a service account key (or workload identity configuration).
  5. For the direct Gemini API: your API key.
  6. Select the target model (e.g., a Gemini model suited for code generation tasks).
  7. Save the configuration and restart the extension's language server if prompted.
  8. Test the connection by opening a playbook and triggering an inline suggestion or a generation prompt.
Once connected, the Coding Assistant uses Gemini as its backing model for suggestions, task generation, and inline completions — the authoring experience in VS Code doesn't change, only the model behind it does.

See also: Connect the AAP Intelligent Assistant to Azure OpenAI: Setup Guide

Example: A Playbook Task Generated With Gemini as the Backing Model

The point of BYOM is that the authoring workflow stays identical regardless of which model is behind the Coding Assistant. Here's an illustrative example of a task you might get suggested when asking the assistant to "ensure the nginx service is installed, enabled, and configured with a custom worker count":

---
- name: Configure and enable nginx with tuned worker processes
  hosts: web_servers
  become: true
  vars:
    nginx_worker_processes: 4

  tasks:
    - name: Install nginx package
      ansible.builtin.package:
        name: nginx
        state: present

    - name: Deploy nginx worker configuration
      ansible.builtin.template:
        src: templates/nginx_workers.conf.j2
        dest: /etc/nginx/conf.d/workers.conf
        owner: root
        group: root
        mode: "0644"
      notify: Reload nginx

    - name: Ensure nginx service is enabled and running
      ansible.builtin.service:
        name: nginx
        state: started
        enabled: true

  handlers:
    - name: Reload nginx
      ansible.builtin.service:
        name: nginx
        state: reloaded

Whether this suggestion came from Red Hat AI, watsonx, or Gemini/Vertex, the output shape is the same — valid, idempotent Ansible YAML. What changes behind the scenes is the model doing the reasoning and completion.

Where BYOK Fits In

It's worth noting a related but separate announcement from the same event: BYOK (Bring Your Own Knowledge), currently in Tech Preview. BYOK lets organizations inject their own internal policies, best practices, and procedures into the Intelligent Assistant's RAG pipeline — meaning answers can be grounded in your organization's actual change-management procedures, network naming conventions, and compliance requirements such as PCI-DSS, HIPAA, or SOC2, plus internal runbooks, rather than only generic public Ansible documentation. BYOK is scoped to the Intelligent Assistant, not the Coding Assistant, so it doesn't change how you connect Gemini to VS Code — but it's a signal of where Red Hat is heading with grounding AI features in organization-specific context across the platform.

See also: Connect the AAP Intelligent Assistant to OpenAI: Setup Guide

Key Takeaways

  • The Coding Assistant (VS Code extension) and Intelligent Assistant (AAP UI chatbot) have separate BYOM provider timelines — don't assume support in one implies support in the other.
  • Google Gemini/Vertex is supported for the Coding Assistant starting at AAP 2.6, but is only "Coming Soon" for the Intelligent Assistant.
  • IBM watsonx was the first external provider supported by the Coding Assistant (AAP 2.5+), predating Gemini/Vertex support by one release.
  • OpenAI and Azure OpenAI remain "Coming Soon" for the Coding Assistant even though both are already live on the Intelligent Assistant.
  • Connecting Gemini/Vertex requires a GCP project with Vertex AI enabled (or a Gemini API key), configured directly in the Ansible VS Code extension's model provider settings.
  • BYOK, a separate Tech Preview feature, extends the Intelligent Assistant's RAG pipeline with organization-specific policies and compliance context — it does not affect Coding Assistant connectivity.
For teams already invested in Google Cloud, AAP 2.7's Coding Assistant support for Gemini/Vertex means you can keep playbook authoring inside your existing model governance and billing relationship with Google, while still benefiting from the same in-editor Ansible authoring experience Red Hat ships by default.

Category: installation

Browse all Ansible tutorials · AnsiblePilot Home