# Azure support

**URL:** <https://forum.ansible.com/t/azure-support/15305>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [May 22, 2014, 2:09pm UTC](https://forum.ansible.com/t/azure-support/15305 "2014-05-22T14:09:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Johren](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@Martin\_Johren](https://forum.ansible.com/u/Martin_Johren)\
**Post date:** [May 22, 2014, 2:09pm UTC](https://forum.ansible.com/t/azure-support/15305/1 "2014-05-22T14:09:26Z")

</div>

Hi,

I just wanted to know whether an azure module is planned or in work? Anybody knows that?

Best  
Martin

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [May 22, 2014, 2:17pm UTC](https://forum.ansible.com/t/azure-support/15305/2 "2014-05-22T14:17:41Z")

</div>

I have not heard anything regarding one, but we’re always open to new contributions. It does appear the Microsoft has a python API library on PyPI: [https://pypi.python.org/pypi/azure/0.8.0](https://pypi.python.org/pypi/azure/0.8.0) which is Apache-licensed, so using that should be no problem. Let us know if you or anyone else is interested in writing this, and if you have any questions.

Thanks!

---

<div class="post-metadata">

**Author:** ![Martin\_Johren](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@Martin\_Johren](https://forum.ansible.com/u/Martin_Johren)\
**Post date:** [May 22, 2014, 2:30pm UTC](https://forum.ansible.com/t/azure-support/15305/3 "2014-05-22T14:30:45Z")

</div>

K, thanks for the info. I'll look into that. Good starting point would be to do it similar like the aws modules right?

Best regards  
Martin

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [May 22, 2014, 3:47pm UTC](https://forum.ansible.com/t/azure-support/15305/4 "2014-05-22T15:47:24Z")

</div>

Yes, the AWS/EC2 modules are pretty well used and break the functionality of different parts of their offering into manageable chunks. Definitely don’t try to cram every feature Azure supports into a single module. The aws and rax modules also make a good use of the code-reuse functionality we offer, to remove a lot of boilerplate code like authentication, etc.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [May 23, 2014, 12:24pm UTC](https://forum.ansible.com/t/azure-support/15305/5 "2014-05-23T12:24:19Z")

</div>

We’re very open to pull requests.

I have been approached by some folks interested in working on them. Details still TBD.

If this is something you’d like to work on, please do!

---

<div class="post-metadata">

**Author:** ![Martin\_Johren](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@Martin\_Johren](https://forum.ansible.com/u/Martin_Johren)\
**Post date:** [May 24, 2014, 7:51am UTC](https://forum.ansible.com/t/azure-support/15305/6 "2014-05-24T07:51:20Z")

</div>

Hi,

I just started a small not useful module here (it’s just for learning how things work): [https://github.com/matlockx/ansible/commit/f0eb61e2f3dc938c8d4e77639f20b9f1c39e2fe2](https://github.com/matlockx/ansible/commit/f0eb61e2f3dc938c8d4e77639f20b9f1c39e2fe2)  
Let me know if i’m on the right track since i’m not really a python dev and used to be an ansible user only.  
When it’s ok i start implementing starting and stopping instances.

Best

Martin

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [May 24, 2014, 11:23am UTC](https://forum.ansible.com/t/azure-support/15305/7 "2014-05-24T11:23:19Z")

</div>

You might want to remove the common\_argument\_spec() function from your class, as it doesn’t really need to be there but beyond that it looks like a good starting point.

---

<div class="post-metadata">

**Author:** ![Martin\_Johren](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@Martin\_Johren](https://forum.ansible.com/u/Martin_Johren)\
**Post date:** [May 24, 2014, 12:06pm UTC](https://forum.ansible.com/t/azure-support/15305/8 "2014-05-24T12:06:28Z")

</div>

Hi,  
Thanks for the quick answer. One last question: where to better put the common\_argument\_spec? Or do you mean just somewhere else but not in this class?

Thx

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [May 24, 2014, 1:25pm UTC](https://forum.ansible.com/t/azure-support/15305/9 "2014-05-24T13:25:43Z")

</div>

Yes, just move it out of the class but keep it in that module. That’s the way the other shared code modules like ec2 work.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [May 25, 2014, 8:54pm UTC](https://forum.ansible.com/t/azure-support/15305/10 "2014-05-25T20:54:41Z")

</div>

Hi folks,

As this is a development topic, let’s move this thread over to ansible-devel.

Thanks!

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [May 30, 2014, 1:26pm UTC](https://forum.ansible.com/t/azure-support/15305/11 "2014-05-30T13:26:04Z")

</div>

It looks like we’ve received another contribution for this: [https://github.com/ansible/ansible/pull/7593](https://github.com/ansible/ansible/pull/7593)

This has not yet been merged in, but you may want to look at it and see if it meets your needs. If you’ve gotten pretty far in developing your version, you may also want to compare them to see if yours covers any areas that this one does not, and either move that functionality into the one above if/when it is merged or submit a competing version.

As Michael requested, any further discussion on this topic should now be moved to ansible-devel.

Thanks!

---

<div class="post-metadata">

**Author:** ![Martin\_Johren](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@Martin\_Johren](https://forum.ansible.com/u/Martin_Johren)\
**Post date:** [May 30, 2014, 2:02pm UTC](https://forum.ansible.com/t/azure-support/15305/12 "2014-05-30T14:02:48Z")

</div>

Moved to ansible devel with same name.  
Thanks for the info. I left a comment at the pull request cause I’m also right before a pull request. 🙂
