If your inventory is targeting localhost then that means it's trying to run a Windows module on the Ansible controller which won't work. You cna use the azure_rm_virtualmachine module to spin up a host but then you will have to use something like 'add_host' [1] to add the host for the current execution then change the play to that new host.
[1] https://docs.ansible.com/ansible/latest/modules/add_host_module.html Thanks Jordan -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9836a964-85bf-414c-8d36-33c52c000424%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.