unable to install vim plugin via shell module

I want to install vim plugins with ansible shell module

the task is quite simple as follow

  • name: install vim vundle plugin
    shell: “vim +PluginInstall +qall”

but the playbook will hang at this task like forever.

even with -vv or -vvv , there`s no more detail log , it just hangs !

any suggestions ??

When you run the shell module Ansible would use non-interactive shell.
Non-interactive shell read very few environment files so the environment variables vim expect is probably not there.