Merging GPLv3 and AGPL licensing in a module development

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

Thanks in advance.

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 :slight_smile: ), 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

Hi Felix,

Thanks for the help. Can you please walk me through the licensing requirements note on this page? I think the note section is stating the opposite.

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.

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.