> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Support of multiple Ansible versions

> Configure and use multiple Ansible versions in Itential Gateway via virtual environments.

You can optionally select which version of Ansible to use to execute a particular Ansible playbook in Itential Gateway. Virtual environments (VENVs) let you associate any Ansible playbook with an existing virtual environment. Any Ansible playbook not associated with a virtual environment will execute in the default version of Ansible configured for Gateway.

## Activate and install Ansible VENV

Using a terminal, run the lines of code below and choose the version of Ansible needed (in the example, Ansible 2.9.0 is shown).

Place a new virtual environment in the Ansible virtual environment directory:

```bash
/opt/automation-gateway/ansible_venvs/
```

Activate the environment and install the Ansible version of your choice:

```bash
python3 -m venv /opt/automation-gateway/ansible_venvs/ansible2.9
source /opt/automation-gateway/ansible_venvs/ansible2.9/bin/activate
pip install ansible==2.9.0
```

## Choose the Ansible VENV version to use

In Gateway, navigate to **Ansible** and then click **Playbooks** to open the menu and select the appropriate playbook.

From the **Parameters** tab, open the **Select an Ansible Venv** dropdown to display the available versions of Ansible.

![](/_fern-img/85ff42db3d54c52c226c0c00af7a02d3e3b6802b45c7a5dae61d2492b75a6910.webp)

Once you have selected the Ansible version, click the save (disk) icon to automatically set the decorator.

![](/_fern-img/bf95d5e59d1f0a9a637c8a3d5715e57febac30d601a1bba68ff2db36d081aaba.webp)

## Ansible configuration

After setting the decorator, navigate to **Ansible Configuration** in Gateway to verify the **Ansible Venv** checkbox is selected and the **Ansible Venv Path** is shown.

![](/_fern-img/8be88d04e29c8930b5205c25fe71c75e26fa9164c124fb6b717bdb50b032a2d2.webp)

If **Ansible Venv** is not checked, the **Select an Ansible Venv** dropdown in the **Parameters** tab of the playbook will be grayed out and unavailable.