title: Library errors running ansible on azure vm
body: <p>Module not loaded error running ansible on Azure. </p>
  
  <p>Trying to install ansible on Azure and run some test code </p>
  
  <p>Trying to test some deployment installing ansible on an Azure VM. 
  --installed following packages in the VM 
  --Azure specific 
  --install packages for azure python SDK modules </p>
  
  <pre><code>sudo apt-get update &amp;&amp; sudo apt-get install -y libssl-dev libffi-dev python-dev python-pip
  </code></pre>
  
  <p>--install ansible packeges </p>
  
  <pre><code>sudo pip install ansible[azure]
  sudo pip install msrestazure
  sudo pip install msrest
  </code></pre>
  
  <p>When trying creating a resource group, get an error with library not loaded error </p>
  
  <pre><code>---
  - hosts: localhost
    connection: local
    tasks:
      - name: Create resource group
        azure_rm_resourcegroup:
          name: ansible-rg
          location: centralus
        register: rg
      - debug:
          var: rg
  </code></pre>
  
  <p>Getting the error, </p>
  
  <blockquote>
    <p>TASK [Create resource group]
    ************************************************************************************************************* An exception occurred during task execution. To see the full
    traceback, use -vvv. The error was: ImportError: No module named
    typing fatal: [localhost]: FAILED! => {"changed": false, "msg":
    "Failed to import the required Python library (msrestazure) on
    's Python /usr/bin/python. Please read module documentation and
    install in the appropriate location"}</p>
    
    <p>PLAY RECAP</p>
    
    <hr>
    
    <p>Create the resource group</p>
  </blockquote>