Skip to content

Ansible#

Server#

For more information about the LSP server, check ansible-language-server.

Installation#

This Server supports automatic install. Install this language server with M-xlsp-install-serverRETansible-lsRET.

npm i -g @ansible/ansible-language-server

Debugger: Not available#

Available configurations#

lsp-ansible-add-on?#

Type: boolean

Default: t

Make the client add-on so that it works with other language servers. yamllsis a common one.

Enabled by default.


lsp-ansible-ansible-path#

Type: string

Default: ansible

Path to the ansible executable. $PATH is searched for the executable.


lsp-ansible-completion-provide-module-option-aliases#

Type: boolean

Default: t

Toggle alias provider when completing module options.


lsp-ansible-completion-provide-redirect-modules#

Type: boolean

Default: t

Toggle redirected module provider when completing modules.


lsp-ansible-execution-environment-container-engine#

Type: (choice (const auto) (const podman) (const docker))

Default: auto

The container engine to be used while running with execution environment. Valid values are auto, podman and docker. For auto it will look for podman then docker.


lsp-ansible-execution-environment-container-options#

Type: string

Default: ``

Extra parameters passed to the container engine command. Example: -–net=host


lsp-ansible-execution-environment-enabled#

Type: boolean

Default: nil

Enable or disable the use of an execution environment.


lsp-ansible-execution-environment-image#

Type: string

Default: quay.io/ansible/creator-ee:latest

Specify the name of the execution environment image.


lsp-ansible-execution-environment-pull-arguments#

Type: string

Default: ``

Specify any additional parameters for the pull command. Example: --tls-verify=false


lsp-ansible-execution-environment-pull-policy#

Type: (choice (const always) (const missing) (const never) (const tag))

Default: missing

Specify the image pull policy. Valid values are always, missing, never and tag. Setting always will always pull the image when extension is activated or reloaded. Setting missing will pull if not locally available. Setting never will never pull the image and setting tag will always pull if the image tag is latest, otherwise pull if not locally available.


lsp-ansible-execution-environment-volume-mounts#

Type: (lsp-repeatable-vector plist)

Default: []

Additonnal volumes to mount in container. The value is a vector of plists. Expected properties are: - src: 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 property is optional, and is a comma-separated list of options. Example: ro,Z


lsp-ansible-language-server-command#

Type: (repeat :tag List of string values string)

Default: (ansible-language-server --stdio)

The command that starts the ansible language server.


lsp-ansible-python-activation-script#

Type: string

Default: ``

Path to a custom activate script. It will be used instead of lsp-ansible-python-interpreter-path to run in a Python virtual environment.


lsp-ansible-python-interpreter-path#

Type: string

Default: ``

Path to the python/python3 executable. This setting may be used to make the extension work with ansible and ansible-lint installations in a Python virtual environment.


lsp-ansible-use-fully-qualified-collection-names#

Type: boolean

Default: t

Toggles use of fully qualified collection names when inserting a module name. Disabling it will only use FQCNs when necessary, that is when the collection is not configured for the task.


lsp-ansible-validation-enabled#

Type: boolean

Default: t

Toggle validation provider. If enabled and ansible-lint is disabled, validation falls back to ansible-playbook --syntax-check.


lsp-ansible-validation-lint-arguments#

Type: string

Default: ``

Optional command line arguments to be appended to ansible-lint invocation. See ansible-lint documentation.


lsp-ansible-validation-lint-enabled#

Type: boolean

Default: t

Enables/disables use of ansible-lint.


lsp-ansible-validation-lint-path#

Type: string

Default: ansible-lint

Path to the ansible-lint executable. $PATH is searched for the executable.



Last update: December 30, 2024