[openstack-dev] [tc][ansible][ironic] Reusing Ansible code in OpenStack projects
doug at doughellmann.com
Thu May 19 12:42:57 UTC 2016
Excerpts from Pavlo Shchelokovskyy's message of 2016-05-19 15:28:03 +0300:
> Hi all,
> I have a question re FOSS licenses interplay. I am pretty sure that
> OpenStack community (e.g. openstack-ansible) has already faced such
> questions and I would really appreciate any advice.
> We are developing a new ansible-based deployment driver for Ironic  and
> would like to use some parts of ansible-lib Python API to avoid boilerplate
> code in custom Ansible modules and callbacks we are writing, and in the
> future probably use Ansible Python API to launch playbooks themselves.
> The problem is Ansible and ansible-lib in particular are licensed under GPL
> v3  "or later" . According to  Apache 2.0 license is only one way
> compatible with GPL v3 (GPL v3-licensed code can include Apache
> 2.0-licensed code, but not vice versa).
> I am by far not a legal expert, so my questions are:
> Does it mean that the moment I do "from ansible import ..." in my Python
> code, which AFAIU means I am "linking" to it, I am required to use a
> GPLv3-compliant license for my code too (in particular not Apache 2.0)?
> What problems might that imply in respect with including such code in an
> OpenStack project (e.g. submitting it to Ironic repo) and distributing the
I'm not an expert on the interpretation of what "linking" is when it
comes to Python apps, but we have a policy that OpenStack projects are
not allowed to depend on GPL libraries . So I think you can't do what you
want, because of that policy.
> If there are indeed problems with that, would it be safer to keep the code
> in a separate project and also distribute it separately?
> Even when distributed separately, will merely using (dynamically importing
> at run-time) a GPLv3-licensed driver from ApacheV2-licensed Ironic
> constitute any license violation?
Distribution isn't the only issue, it's how the code is executed.
> Note that technically we could avoid re-using Ansible code for Ansible
> modules and callbacks, just that it would be much-much less convenient.
Unfortunately I think you're going to have to do the less convenient
thing this time.
>  https://review.openstack.org/#/q/topic:bug/1526308
>  https://github.com/ansible/ansible/blob/devel/COPYING
>  https://github.com/ansible/ansible/blob/devel/lib/ansible/__init__.py#L8
>  http://www.apache.org/licenses/GPL-compatibility.html
> Best regards,
> Dr. Pavlo Shchelokovskyy
> Senior Software Engineer
> Mirantis Inc
More information about the OpenStack-dev