# Module design questions: digital\_ocean\_domain

**URL:** <https://forum.ansible.com/t/module-design-questions-digital-ocean-domain/25777>\
**Category:** Ansible Developer\
**Created:** [October 19, 2017, 10:10am UTC](https://forum.ansible.com/t/module-design-questions-digital-ocean-domain/25777 "2017-10-19T10:10:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Bond1](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@Anthony\_Bond1](https://forum.ansible.com/u/Anthony_Bond1)\
**Post date:** [October 19, 2017, 10:10am UTC](https://forum.ansible.com/t/module-design-questions-digital-ocean-domain/25777/1 "2017-10-19T10:10:25Z")

</div>

I’m working to remove the external dependencies within the digital\_ocean modules and I have a few questions. I’m looking for some helpful guidance to make sure I’m moving in the right direction.

1. When a module has been labeled as stable it’s best practice to keep the exact functionality moving forward. Do we need to move this module back to preview if we remove the underlying dependency and add new functionality? The current functionality would remain unchanged here is a refactor pull request for [digital\_ocean\_domain](https://github.com/ansible/ansible/pull/29179).

2. The digital\_ocean\_domain module only add, remove and updates an existing domain within DigitalOcean. I would like to extend the functionality to also manage the individual domain records. Another user actually beat me to the development and opened a [pull request](https://github.com/ansible/ansible/pull/31765)with the domain record functionality under a new module name. I believe this functionality should exist within the same digital\_ocean\_domain module however the user does have some valid points. I’m curious to know what the development community thinks.

We actually have two pull requests adding the domain record functionality.

1. PR including the record management functionality into digital\_ocean\_domain: [PR30201](https://github.com/ansible/ansible/pull/30201)
2. PR creating a new module to manage domain records: [PR31765](https://github.com/ansible/ansible/pull/31765)

Of course if I’m missing some important information or standards please feel free to point me in the right direction.

---

<div class="post-metadata">

**Author:** ![tkuratom](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Post date:** [October 21, 2017, 12:52am UTC](https://forum.ansible.com/t/module-design-questions-digital-ocean-domain/25777/2 "2017-10-21T00:52:00Z")

</div>

ryansb and sivel commented on your question onIRC but it sounds like  
you'd already left for the day. Here's what they said:

\<abond\> Good afternoon! I was wondering if someone could provide  
guidance on a design decision within the  
digital\_ocean\_domain module. I'm currently working with Akasurde to  
remove the `dopy` dependency within the DO modules so users can  
use Ansible out of the box. My original idea was to refactor the  
digital\_ocean\_domain module first keeping the same functionality as  
today. Second enhancement is to include the ability to add/edit  
domains  
\<abond\> I have a new PR [https://github.com/ansible/ansible/pull/31765](https://github.com/ansible/ansible/pull/31765)  
to create a digital\_ocean\_domain\_records module to add this  
functionality. Should I push to have this included in the current  
domain module or create a new module for domain records?  
\<ryansb\> Generally I'd say managing records is different from  
managing the domain  
\<ryansb\> so a new module seems like the way to go  
\<sivel\> +1  
\<ryansb\> especially since lots of params wouldn't make sense f  
or both, e.g. "contact email" or whatnot  
\<ryansb\> or TTL.

---

<div class="post-metadata">

**Author:** ![Anthony\_Bond](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@Anthony\_Bond](https://forum.ansible.com/u/Anthony_Bond)\
**Post date:** [October 21, 2017, 1:17am UTC](https://forum.ansible.com/t/module-design-questions-digital-ocean-domain/25777/3 "2017-10-21T01:17:14Z")

</div>

Thank you Toshio! Yes I actually lost my connection that afternoon.
