ansible with azure

I started to work with Ansible with azure.

I need to use dynamic inventory.
I provision new vm image using Ansible and its work fine. but when I try to do it with image that I capture it failed with error "OSImage tmpl02 not found. If you are using a VM image, it must be specified as VMImageName for the role, not as SourceImageName for OSVirtualHardDisk

probably there are difference between azure built in image and image that I created.

need same help here.

I haven’t used this myself but you should know there is a lot of work being done in current development version of Ansible to provide greatly enhanced capabilities for working with Azure.

There is a repository of the modules here: https://github.com/ansible/azurerm but there is lots of development activity going on so these may well arrive in latest development version of ansible soon.

Hope this helps,

Jon