# Merging GPLv3 and AGPL licensing in a module development

**URL:** <https://forum.ansible.com/t/merging-gplv3-and-agpl-licensing-in-a-module-development/36570>\
**Category:** Ansible Developer\
**Created:** [April 27, 2022, 10:33am UTC](https://forum.ansible.com/t/merging-gplv3-and-agpl-licensing-in-a-module-development/36570 "2022-04-27T10:33:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Can\_Ozyurt](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@Can\_Ozyurt](https://forum.ansible.com/u/Can_Ozyurt)\
**Post date:** [April 27, 2022, 10:33am UTC](https://forum.ansible.com/t/merging-gplv3-and-agpl-licensing-in-a-module-development/36570/1 "2022-04-27T10:33:47Z")

</div>

Hello everyone,

I and my team are writing an ansible collection for MAAS which we hope to share with everyone. We are using python-libmaas library to communicate with the MAAS API. python-libmaas is being developed under GNU AGPL and ansible requires every module to be licensed under GPLv3 and mod\_utils under BSD. I can’t really wrap my mind around how licensing at this point works or how compatible they are. I need your help to understand how we should proceed.

[python-libmaas LICENSE](https://github.com/maas/python-libmaas/blob/master/LICENSE)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [April 27, 2022, 12:00pm UTC](https://forum.ansible.com/t/merging-gplv3-and-agpl-licensing-in-a-module-development/36570/2 "2022-04-27T12:00:57Z")

</div>

Hi,

> ansible requires every module to be licensed under GPLv3 and  
> mod\_utils under BSD.

that is not correct. While the ansible-test sanity checks look for such  
copyright notices, you can also decide to ignore these sanity check  
failures. Especially module\_utils are often also GPLv3+ licensed in  
collections.

What you have to look out for are non-module plugins. These have to  
import GPLv3+ licensed code from ansible-core. For what this means  
exactly you have to ask a lawyer (I'm not one 🙂 ), but usually it  
means that your code also has to be GPLv3+ licensed.

This is not the case for modules, so there you can use other licenses.  
For module utils it depends on whether you import them only from  
modules, or also from plugins. If you import them from plugins, you  
probably have to talk to a lawyer if you want to be on the safe side...

Hope this helps a bit,  
Felix

---

<div class="post-metadata">

**Author:** ![Can\_Ozyurt](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@Can\_Ozyurt](https://forum.ansible.com/u/Can_Ozyurt)\
**Post date:** [April 27, 2022, 1:24pm UTC](https://forum.ansible.com/t/merging-gplv3-and-agpl-licensing-in-a-module-development/36570/3 "2022-04-27T13:24:14Z")

</div>

Hi Felix,

Thanks for the help. Can you please walk me through the licensing requirements note on [this page](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_in_groups.html)? I think the note section is stating the opposite.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [April 27, 2022, 1:54pm UTC](https://forum.ansible.com/t/merging-gplv3-and-agpl-licensing-in-a-module-development/36570/4 "2022-04-27T13:54:48Z")

</div>

To clarify, this requirement was part of the ansible package up to  
version 2.9 and the split to collections and it is still a requirement  
for ansible-core, but not for the current ansible package which is  
community maintained and includes ansible-core + a set of selected  
collections.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 27, 2022, 2:01pm UTC](https://forum.ansible.com/t/merging-gplv3-and-agpl-licensing-in-a-module-development/36570/5 "2022-04-27T14:01:28Z")

</div>

As Brian mentions, we had a default rule in the ansible/ansible repo that module\_utils had to be BSD, but in some circumstances we allowed them to be in other licenses when their source or dependencies required it. The reason for the BSD license was to not force every module that imported those module\_utils to inherit the GPL license, for authors that wanted to distribute their module under a different but compatible license. But that decision to use BSD for module\_utils doesn’t necessarily apply outside the scope of ansible/ansible.

If you are using python-libmaas in module\_utils, they would have to inherit that license as well. Licensing is tricky when it comes to software, so it’s always wise to consult a lawyer.

The FSF interprets the GPL to mean that anything that imports a GPL library is a derivative work, and must inherit the GPL license.
