Configuration¶
This extension supports multi-root workspaces, and as such, can be configured on any level (User, Remote, Workspace and/or Folder).
Basic Configuration¶
ansible.ansible.path: Path to theansibleexecutable.ansible.ansible.reuseTerminal: Enabling this will cause ansible commands run through VS Code to reuse the same Ansible Terminal.ansible.ansible.useFullyQualifiedCollectionNames: Toggles use of fully qualified collection names (FQCN) when inserting a module name. Disabling it will only use FQCNs when necessary, that is when the collection isn't configured for the task.ansible.playbook.arguments: Specify additional arguments to append to ansible-playbook invocation. e.g.--syntax-check
Validation Settings¶
ansible.validation.lint.arguments: Optional command line arguments to be appended toansible-lintinvocation. Seeansible-lintdocumentation.ansible.validation.lint.enabled: Enables/disables use ofansible-lint.ansible.validation.lint.path: Path to theansible-lintexecutable.ansible.ansibleNavigator.path: Path to theansible-navigatorexecutable.
Execution Environment Settings¶
ansible.executionEnvironment.containerEngine: The container engine to be used while running with execution environment. Valid values areauto,podmananddocker. Forautoit will look forpodmanthendocker.ansible.executionEnvironment.containerOptions: Extra parameters passed to the container engine command example:--net=hostansible.executionEnvironment.enabled: Enable or disable the use of an execution environment.ansible.executionEnvironment.image: Specify the name of the execution environment image.ansible.executionEnvironment.pull.arguments: Specify any additional parameters that should be added to the pull command when pulling an execution environment from a container registry. e.g.--tls-verify=falseansible.executionEnvironment.pull.policy: Specify the image pull policy. Valid values arealways,missing,neverandtag. Settingalwayswill always pull the image when extension is activated or reloaded. Settingmissingwill pull if not locally available. Settingneverwill never pull the image and setting tag will always pull if the image tag is 'latest', otherwise pull if not locally available.ansible.executionEnvironment.volumeMounts: The setting contains volume mount information for each dict entry in the list. Individual entry consists ofsrc: The name of the local volume or path to be mounted within execution environment.dest: The path where the file or directory are mounted in the container.options: The field is optional, and is a comma-separated list of options, such asro,Z
Python Configuration¶
ansible.python.interpreterPath: Path to thepython/python3executable. This setting may be used to make the extension work withansibleandansible-lintinstallations in a Python virtual environment. Supports ${workspaceFolder}.ansible.python.activationScript: Path to a customactivatescript, which will be used instead of the setting above to run in a Python virtual environment.
Lightspeed Configuration¶
Core Settings¶
ansible.lightspeed.enabled: Enable/disable Ansible Lightspeed.ansible.lightspeed.timeout: Request timeout in milliseconds (default: 30000).
LLM Provider Settings¶
Provider configuration is managed through the LLM Provider Settings panel. It can be accessed from the Ansible Development Tools (ADT) sidebar under the Generative AI section, or from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) with:
The panel supports three providers:
- IBM watsonx (WCA): Red Hat Ansible Lightspeed with IBM watsonx Code Assistant (default). Uses OAuth2 authentication.
- Google Gemini: Direct access to Google Gemini models. Requires an API key.
- Red Hat AI: Supports models hosted on the Red Hat AI platform through any OpenAI-compatible endpoint. Requires an API endpoint, API key, and model name.
Provider settings (API endpoint, API key, model name) are stored securely using VS Code's secret storage for sensitive fields and global state for other values.
See LLM Provider Documentation for detailed setup instructions and examples.
Inline Suggestions¶
ansible.lightspeed.suggestions.enabled: Enable inline suggestions.-
Note: Currently only supported with the WCA provider
-
ansible.lightspeed.suggestions.waitWindow: Delay (in milliseconds) prior to sending an inline suggestion request.
Backward Compatibility¶
The following legacy settings are still supported for backward compatibility:
ansible.lightspeed.URL: Mapped toansible.lightspeed.apiEndpointansible.lightspeed.modelIdOverride: Mapped toansible.lightspeed.modelName
Deprecated Settings¶
The following settings are deprecated and will be removed in a future release. Use the LLM Provider Settings panel instead.
ansible.lightspeed.provider: Select AI provider. Use the LLM Provider Settings panel.ansible.lightspeed.apiEndpoint: API endpoint URL. Use the LLM Provider Settings panel.ansible.lightspeed.modelName: Model name/ID. Use the LLM Provider Settings panel.ansible.lightspeed.apiKey: API key. Use the LLM Provider Settings panel for secure storage.
Existing values from deprecated settings are automatically migrated to the panel storage on first activation. See LLM Provider Documentation for full setup instructions.
Completion & Language Server Settings¶
ansible.completion.provideRedirectModules: Toggle redirected module provider when completing modules.ansible.completion.provideModuleOptionAliases: Toggle alias provider when completing module options.ansibleServer.trace.server: Traces the communication between VS Code and the ansible language server.
Environment variables¶
LIGHTSPEED_PREFER_RHSSO_AUTH: When set totrue, Lightspeed with use the OAuth2 Device Flow by default instead of the default OAuth2 authentication. You can trigger it manually with theAnsible Lightspeed: Sign in with Red Hataction.