title: No Module name Yum in Ansible Error on vagrant
body: <p>I was trying out some experiments with Ansible playbooks on Ubuntu Vagrant machine. I have written a simple playbook named exampleyum.yml as follows:</p>
  
  <pre><code>---
  - hosts: local
  
    tasks:
      - name: Installing packages
        yum: name=httpd state=latest
        sudo: yes
  </code></pre>
  
  <p>When I run </p>
  
  <pre><code>ansible-playbook -i ~/inventory.ini exampleyum.yml
  </code></pre>
  
  <p>I am getting below error:</p>
  
  <blockquote>
    <p>An exception occurred during task execution. To see the full
    traceback, use -vvv. The error was: ImportError: No module named yum
    fatal: [localhost]: FAILED! => {"changed": false, "failed": true,
    "module_stderr": "Traceback (most recent call last):\n   File
    \"/tmp/ansible_qeXrGO/ansible_module_yum.py\", line 25, in \n 
    import yum\nImportError: No module named yum\n", "module_stdout": "",
    "msg": "MODULE FAILURE"}</p>
  </blockquote>
  
  <p>It gives some import error and module failure. I read somewhere that <code>Yum</code> is a core module</p>
  
  <p>and hence it should work properly, but it doesn't. Any help would be appreciated. I am pretty new to Ansible.</p>