---
- name: Clean up the environment
  file:
    dest: "{{ azure_venv }}"
    state: absent
  when: clean_environment

- name: Install requirements
  pip:
    name:
      - packaging
      - requests[security]
      - azure-mgmt-compute>=2.0.0,<3
      - azure-mgmt-network>=1.3.0,<2
      - azure-mgmt-storage>=1.5.0,<2
      - azure-mgmt-resource>=1.1.0,<2
      - azure-storage>=0.35.1,<0.36
      - azure-cli-core>=2.0.12,<3
      - msrest==0.4.29
      - msrestazure==0.4.31
      - azure-mgmt-dns>=1.0.1,<2
      - azure-mgmt-keyvault>=0.40.0,<0.41
      - azure-mgmt-batch>=4.1.0,<5
      - azure-mgmt-sql>=0.7.1,<0.8
      - azure-mgmt-web>=0.32.0,<0.33
      - azure-mgmt-containerservice>=2.0.0,<3.0.0
      - azure-mgmt-containerregistry>=1.0.1
      - azure-mgmt-rdbms==1.2.0
      - azure-mgmt-containerinstance==0.4.0
    state: latest
    virtualenv: "{{ azure_venv }}"
    virtualenv_python: python2.7
