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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.