Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>VSCode snippets for AnsibleNew to Visual Studio Code? Get it now.
VSCode snippets for Ansible

VSCode snippets for Ansible

Mattias Baake

|
39,929 installs
| (2) | Free
Provide an automatically build set of snippets for ansible modules.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Snippets for Ansible

I used long time the VSCode ansible extension which was retired at the end of \2020. Missing the snippets I build them by myself based on the script of that old extension and the new parser script of the atom autocomplete extension for ansible.

  • https://github.com/h-hirokawa/atom-autocomplete-ansible/blob/master/libs/parse_ansible.py
  • https://github.com/VSChina/vscode-ansible

Features

Provide snippets for most modules of ansible. Just press Ctrl+SPACE to get the list of all snippets.

For example if you want to use blockinfile type block and press Ctrl+SPACE, select the entry blockinfile_snippet and press ENTER.

Usage example

Tip: Using TAB you can jump to the defined placholder and select from fixed choices if available.

Requirements

Document language need to be set to YAML.

Known issues

If the snippets doesn't load after install, try to reload your VS Code.

Release Notes

1.1.0

  • Add support for file type "ansible" used by Ansible plugin

1.0.1

  • Add keyword for easier search on markplaces
  • Add licence to meta data

1.0.0

Initial public release of this extension. Snippets build for/with ansible v2.9.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft