I hope you have already solved your problem, but for reference, since I had the same problem and Google led me to this question, here is how I solved it:
PyCharm comes with another YAML plugin that will control all your Ansible YAML files. See if there is an icon for your files in the file system browser and editor tabs with the Ansible logo.
These editor tabs associated with the Ansible / YAML plugin can trigger code completion for variables. Those who do not have a logo, no.
For me, the solution was to disable another YAML plugin.
source share