tomaciazek / vscode-ansible

Ansible VS Code Extension
MIT License
28 stars 3 forks source link

Missing highlighting on include's replacements #37

Closed DeviousCrypto closed 3 years ago

DeviousCrypto commented 3 years ago

Problem

Highlighting is missing for the split out of include: ; include_tasks, include_role, import_playbook, import_tasks

This is almost certainly because /playbook_keywords.html does not have these in the Ansible handbook.

Solution

Add the following

keyword:tip

include_tasks: Includes a file with a list of tasks to be executed in the current playbook. include_role: Dynamically loads and executes a specified role as a task. May be used only where Ansible tasks are allowed. import_playbook: Includes a file with a list of plays to be executed. You cannot use this action inside a play. import_tasks: Imports a list of tasks to be added to the current playbook for subsequent execution.

Alternatives

Wait until /playbook_keywords.html is updated to include this information.

Additional context

No response

tomaciazek commented 3 years ago

All include_ keywords are in fact Ansible modules (built-in), so they rely on the same mechanism as other Ansible module invocations in this plugin. Make sure that you have Ansible installed and that VS Code can find it (there are also configuration options for that).