JetBrains IDE plugin

Go to definition, for Ansible variables.

Ctrl-click a variable and Yamlix lists every place it is defined — ordered by the one that actually applies at your caret.

Choose Declaration

  • 8090(applies · stag; prod· roles/app/vars/main.yml)
  • 8000(overridden· roles/app/defaults/main.yml)
  • 9010(overridden· inventories/prod/group_vars/all.yml)
  • 8010(overridden· inventories/stag/group_vars/all.yml)
  • 9030(overridden· inventories/prod/group_vars/webservers.yml)
  • 8040(overridden· inventories/stag/group_vars/canary.yml)
  • 8020(overridden· inventories/stag/group_vars/platform.yml)
  • 8030(overridden· inventories/stag/group_vars/webservers.yml)
  • 9050(overridden· inventories/prod/host_vars/prod-web-1.yml)
  • 8050(overridden· inventories/stag/host_vars/stag-web-1.yml)
  • 8060(overridden· site-playbook.yml)
  • 8070(overridden· vars/common.yml)
  • 8100(not in scope here· roles/app/vars/Darwin.yml)
  • 8200(not in scope here· roles/app/vars/RedHat.yml)
  • 8500(not in scope here· roles/app/tasks/main.yml)
Ctrl-click app_port in pre_tasks: fifteen declarations across two inventories — one applies, eleven are overridden, three are not in scope yet.

What it does

Three shortcuts you already use

No new panel to learn and no new keystroke to remember. The keys you press for Java or Python start answering Ansible questions.

  • ⌘-click

    Jump to a variable

    Every declaration, ordered by what applies at the caret. Overridden and not-yet-in-scope are told apart, not lumped together.

    • 8090applies
    • 8000overridden
    • 8500not in scope here
  • ⌘-click

    Jump to everything else

    Roles, includes, vars_files, templates, handlers, and hosts: patterns into INI and YAML inventories alike. Find Usages goes back the other way.

    • - approles/app/tasks/main.yml
    • - acme.web.proxycollections/ansible_collections/acme/web
    • hosts: webserversinventories/stag/hosts.yml
  • F1

    See it per host

    The effective value for every host, with the ones that agree collapsed so the odd one out is the row you notice.

    • stagstag-web-1debug
    • stagstag-web-2info
    • prod2 hosts agreewarning

Plus completion for variable names and hosts: patterns, and an inspection for roles, includes and file references that resolve to nothing.

The whole file at once

Every variable the open file touches

One panel, answering the question for the file rather than for one caret.

It separates what the file uses from what it defines. The definition that applies sits on top, and everything it beat folds behind one row — so the list is the length of the question, not the length of the repository.

The remarks after each value are the point. A variable whose value differs by host says so. One you define that nothing can ever read is flagged, and that is a real bug you would otherwise ship.

Open an inventory instead and you get its groups: host counts, child groups, the group_vars that apply, and every play that targets each group.

Ansible
  • site-playbook.ymlplaybook · runs on 4 hosts
  • Runs (1)
  • hosts: webservers4 hosts · Deploy the demo application stack
  • Uses (5)
  • inventory_hostnameprovided by Ansible
  • app_port8090
  • role vars8090 · stag · prod · roles/app/vars/main.yml
  • 11 overridden definitions
  • set_fact8500 · roles/app/tasks/main.yml
  • include_vars8100 · roles/app/vars/Darwin.yml
  • include_vars8200 · roles/app/vars/RedHat.yml
  • app_workers6 · 4 · 16 · 14— differs by host
  • app_log_leveldebug · info · warning— differs by host
  • app_urlhttp://{{ inventory_hostname }}:{{ app_port }}/{{ app_name }}
  • Defines (3)
  • app_nameyamlix-demo
  • app_port8090— never wins — something always overrides it
  • deploy_userdeploy
site-playbook.yml open, with app_port expanded. The warning under Defines is the plugin telling you that the app_port defined in this play is dead.

Getting it

Install

Requires a JetBrains IDE, build 2025.2 or newer. No upper bound is declared.

Settings → Plugins → Marketplace, search for Yamlix for Ansible. Or install it straight from the listing page.

Verified by the JetBrains Plugin Verifier against

  • IntelliJ IDEA Community
  • IntelliJ IDEA Ultimate
  • PyCharm
  • GoLand

Runs in

Any JetBrains IDE: Yamlix depends only on the platform and the bundled YAML support. The four above are the ones actually tested.

If it does not fit your project

There is no one way to lay out an Ansible project

Yamlix works out your project's structure rather than assuming a convention. It has not seen every arrangement.

All of these are normal, and they are not the only options

  • ansible.cfg at the repository root — or in a subdirectory, or not present at all
  • one inventory file, or a directory per environment, or both at once
  • roles/ beside the playbooks, or a roles_path pointing somewhere else entirely
  • collections vendored under collections/ansible_collections/
  • several unrelated Ansible projects sharing one repository
  • playbooks run from a wrapper script that changes directory first

If a variable reads as undefined when it plainly is defined, or roles and inventories that exist are not found, that is layout detection rather than resolution.

Open an issue with your directory tree and your ansible.cfg — a link to the repository too, if it is public. I would rather teach the plugin your layout than have you work around it.

Open an issue with your layout

What it is not

Not a linter, and not a replacement for ansible-lint or the official Red Hat Ansible plugin. It answers one question those tools do not: given this file, this host and this position, which definition applies. Run it alongside them.

What it does to your project

Nothing. It reuses the platform's YAML support rather than registering a file type, so it does not claim *.yml. It never shells out to ansible, makes no network calls, and collects no data of any kind.