How to do it...

  1. Create a storage container:
- name: Create storage container  azure_rm_storageblob:     resource_group: example     storage_account_name: examplestorage01     container: cookbook     state: present 
  1. Add a blob to the container:
- name: Upload a file to existing container   azure_rm_storageblob:     resource_group: example     storage_account_name: examplestorage01     container: cookbook     blob: myfile.png     src: /tmp/myfile.png     public_access: blob     content_type: 'application/image' 
  1. Download the uploaded file:
- name: Download blob object  azure_rm_storageblob:     resource_group: example     storage_account_name: examplestorage01     container: cookbook     blob: myfile.png     dest: /tmp/download_file.png 

Get Ansible 2 Cloud Automation Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.