title: How to use ansible to provision vim vundle plugin?
body: <p>I use vundle as plugin manager for vim. And I want to use ansible to automate vundle plugin installation.</p>
  
  <p>But I just can't get ansible to do provision automatically:</p>
  
  <pre><code>- name: install vundle plugin
    shell: vim +PluginInstall +qall
  </code></pre>
  
  <p>above is the ansible playbook YML file for vim. 
  When ansible start to run this task, it just goes on forever, it never ends and it never fails. Until I force it to stop by <code>CTRL C</code>. </p>
  
  <p>If I run that command directly in the guest os, it works fine, vim shows up and finishes installation.</p>
  
  <p>What's the problem here?</p>
  
  <p>==========================================<br>
  <strong>Edit:</strong>  </p>
  
  <p>After read <code>Roy Zuo</code>'s answer, and turn on verbose mode of vim, I tried the following command:</p>
  
  <pre><code>vim -E -s -c "source ~/.vimrc" +PluginInstall +qall -V
  </code></pre>
  
  <p>and below is the output:</p>
  
  <pre><code>continuing in /home/vagrant/.vimrc
  Searching for "/usr/share/vim/vimfiles/after/syntax/syncolor.vim"
  Searching for "/home/vagrant/.vim/after/syntax/syncolor.vim"
  Searching for "/home/vagrant/.vim/bundle/Vundle.vim/syntax/syncolor.vim"
  Searching for "/after/syntax/syncolor.vim"
  Searching for "colors/solarized.vim" in "/home/vagrant/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/home/vagrant/.vim/after,/home/vagrant/.vim/bundle/Vundle.vim,/after"
  Searching for "/home/vagrant/.vim/colors/solarized.vim"
  Searching for "/usr/share/vim/vimfiles/colors/solarized.vim"
  Searching for "/usr/share/vim/vim74/colors/solarized.vim"
  Searching for "/usr/share/vim/vimfiles/after/colors/solarized.vim"
  Searching for "/home/vagrant/.vim/after/colors/solarized.vim"
  Searching for "/home/vagrant/.vim/bundle/Vundle.vim/colors/solarized.vim"
  Searching for "/after/colors/solarized.vim"
  not found in 'runtimepath': "colors/solarized.vim"
  line  188:
  E185: Cannot find color scheme 'solarized'
  finished sourcing /home/vagrant/.vimrc
  continuing in command line
  </code></pre>
  
  <p>It seems vim stopped when it can't find the plugin specified in .vimrc.
  Any idea how to continue?</p>