# Backwards compatible Ansible Collection support in project?

**URL:** <https://forum.ansible.com/t/backwards-compatible-ansible-collection-support-in-project/34912>\
**Category:** Ansible Project\
**Created:** [April 3, 2021, 8:51pm UTC](https://forum.ansible.com/t/backwards-compatible-ansible-collection-support-in-project/34912 "2021-04-03T20:51:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erik\_Godding\_Boye](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@Erik\_Godding\_Boye](https://forum.ansible.com/u/Erik_Godding_Boye)\
**Post date:** [April 3, 2021, 8:51pm UTC](https://forum.ansible.com/t/backwards-compatible-ansible-collection-support-in-project/34912/1 "2021-04-03T20:51:09Z")

</div>

Greetings Ansible Community,

I am a user/customer, contributor and recently a collaborator of [https://github.com/confluentinc/cp-ansible](https://github.com/confluentinc/cp-ansible).

This project has proven extremely valuable in provisioning large and complex Kafka clusters. But already since the start, I have been annoyed by the only supported usage pattern, which is described here: [https://docs.confluent.io/ansible/current/ansible-download.html](https://docs.confluent.io/ansible/current/ansible-download.html).

This way of using cp-ansible does not fit us for several reasons, but mostly because we have other components in our Kafka infrastructure that we want to provision from the same Ansible setup. The workaround so far, has been to use the pesky Git Submodules. After being fed up with that, I filed this cp-ansible issue: [https://github.com/confluentinc/cp-ansible/issues/613](https://github.com/confluentinc/cp-ansible/issues/613).

I have done some of the mandatory (and simple) changes. The work so far is summarized in this mega feature PR: [https://github.com/confluentinc/cp-ansible/pull/630](https://github.com/confluentinc/cp-ansible/pull/630).

But now I have started looking into the probably most complex issue: plugins. Our ultimate goal is: **Support using cp-ansible as an Ansible Collection, but still support the existing usage pattern (git clone )**. Is this possible? I have created a draft PR, but currently it just contains two molecule test scenarios proving that I/we have work to do: [https://github.com/confluentinc/cp-ansible/pull/631](https://github.com/confluentinc/cp-ansible/pull/631)

Does anyone on this mailing list have some hints/tips? I tried to ask on IRC, but just got one negative answer: “Not possible”

Any help would be greatly appreciated!

Regards,  
Erik

---

<div class="post-metadata">

**Author:** ![Erik\_Godding\_Boye](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@Erik\_Godding\_Boye](https://forum.ansible.com/u/Erik_Godding_Boye)\
**Post date:** [April 22, 2021, 7:06am UTC](https://forum.ansible.com/t/backwards-compatible-ansible-collection-support-in-project/34912/2 "2021-04-22T07:06:18Z")

</div>

Hi,

I am still struggeling to make this work, and the lack of comments to this question tells me that it might not be possible at all? I would appreciate if someone with in-depth knowledge of Ansible could confirm this - so I can avoid wasting more time on this issue.

Since my original question, I have done some more testing, and it seems like the plugins is the (only) blocker. So close, but no sigar…

- To use the project as a collection, all plugins must be referred to by their FQN.
- When cloning the project (existing usage pattern), the plugins are not found - since the new collection plugin location is not taken into consideration. I have tried symlinking to fix the location issue, but since plugins has to be referred to by their FQN this does not work either.

I think it would be nice if Ansible could support a gradual migration from legacy usage patterns to collection, and not the “big bang” I am now experiencing.

Erik

lørdag 3. april 2021 kl. 22:51:09 UTC+2 skrev Erik Godding Boye:

---

<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 22, 2021, 1:47pm UTC](https://forum.ansible.com/t/backwards-compatible-ansible-collection-support-in-project/34912/3 "2021-04-22T13:47:54Z")

</div>

afaik there is nothing preventing the old usage pattern, collections  
introduce a new way of doing things, they do not eliminate any  
existing way.

As for giving a migration path to a every custom workflow, I don't  
think this is a scalable request.

---

<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 22, 2021, 1:49pm UTC](https://forum.ansible.com/t/backwards-compatible-ansible-collection-support-in-project/34912/4 "2021-04-22T13:49:32Z")

</div>

As for the plugin issue, there should be examples for migrating roles  
that will handle the fqcn vs non fqcn referencing and module\_utils  
imports in the works.

---

<div class="post-metadata">

**Author:** ![Erik\_Godding\_Boye](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@Erik\_Godding\_Boye](https://forum.ansible.com/u/Erik_Godding_Boye)\
**Post date:** [April 26, 2021, 1:03pm UTC](https://forum.ansible.com/t/backwards-compatible-ansible-collection-support-in-project/34912/5 "2021-04-26T13:03:46Z")

</div>

Thanks for your feedback! I am not asking for a “migration path to every custom workflow”. I just would like to see some support tools to facilitate the migration from a typically legacy Ansible project setup, to the modern collection layout - which I think provides far better organization and metadata description.

Are you able to provide some links or references to “examples for migrating roles that will handle the fqcn vs non fqcn referencing and module\_utils imports”, even in WIP state? That sounds interesting!

Erik
