Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Pycharm with Ansible plugin to do code completion for variables?

I'm using Pycharm free community version 2016.2.3 with YAML/Ansible plugin, but I don't manage to trigger the code completion for variables. (I do know for sure it's possible.) Is there some configuration I need to set prior to that?

like image 780
A. Man Avatar asked Dec 07 '16 21:12

A. Man


People also ask

How do you make Ansible playbook in PyCharm?

Of course you can run Ansible within PyCharm via command-line, but it also works with the “Run” button. Open “Run/Debug Configurations” and add new Bash configuration. Give a name and Script value. The value should be the main Ansible playbook.

Does PyCharm support Ansible?

This plugin add ansible support for PyCharm Pro version. include: ansible keywords auto complete. ansible module name auto complete.

Which editor is best for Ansible?

vim. An open-source, free command-line text editor. Useful vim plugins include: Ansible vim - vim syntax plugin for Ansible 2.


1 Answers

I hope you solved your problem already, but for the reference, as I had the same problem and Google led me to this question, here is how I solved it:

PyCharm comes with another YAML Plugin which will take all your Ansible YAML files under its control. Have a look if the favicon of your your files in the filesystem browser and the editor tabs have the Ansible logo.

Those editor tabs, associated with the Ansible/YAML plugin, are able to trigger code completion for variables. Those without the logo, do not.

For me the solution was to disable the other YAML Plugin.

like image 67
Comradin Avatar answered Dec 01 '22 17:12

Comradin