MSDehghan / AnsiblePlugin

IntelliJ plugin that helps developing Ansible files
134 stars 16 forks source link

Only recognizes a playbook by name "playbook.yaml" #11

Closed jbrummal closed 3 years ago

jbrummal commented 3 years ago

It would appear the code looks for the keyword "playbook.yaml" to apply the help. I really like it, however I do have multiple playbooks with varying names and it would be nice to get the help that this is providing.

MSDehghan commented 3 years ago

Hi. The plugin scans all ".yml" and ".yaml" files and tries to detect playbooks. File name is not important. There must be another reason. Would you please show me one of not detected files? Do they have ".yaml" or ".yml" suffix in their name?

jbrummal commented 3 years ago

I did a couple of tests with the names of the files...to check...maybe I missed something. Could I have a conflict in the plugins?

The code below is what I used in multiple files, simply changing the names around.

I was able to playbook.yaml and playbook.yml in the same directory to both get syntax highlighting, but if I changed to jason.yml or anything else but "playbook.(yaml|yml)" it would not.

`---

ansible -m copy -a "src=./master.gitconfig dest=~/.gitconfig" localhost

MSDehghan commented 3 years ago

Maybe it's plugin conflict. Do you installed the "YAML/Ansible" plugin? and all of ".yml" files are assigned to default YAML plugin?

jbrummal commented 3 years ago

That plugin is installed, but I have it disabled at the moment. I do have 'YAML' plugin installed. If I uninstall that one...nothing is recognized at all for yours. If I enable the "YAML/Ansible" one, it actually disables your. Weird...after that full sequence, I now get all my .yaml and .yml files showing with your icon and getting the help. Hmm...either way, looks like it might have just been a conflict. Thanks for monitoring this and good job with the plugin!

MSDehghan commented 3 years ago

You should enable "YAML" plugin and uninstall "YAML/ansible". my plugin depends on default installed YAML plugin!