This little guide explains the way how to install Ansible and the Azure Preview Modules in a virtualenv on Ubuntu 18.04. It also makes use of a wrapper for virtualenv, to make it easier to use virtualenv.
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get install -y python-setuptools python-dev libffi-dev libssl-dev git sshpass tree
sudo apt-get install python-pip