On Thu, 25 Feb 2016, Mike Biancaniello wrote:

I have done similar things to enable my plugins for v1 AND v2. Essentially:

from ansible import __version__ as ANSIBLE_VERSION
   if ANSIBLE_VERSION.startswith('2'):
   else:


More recently, I am encouraging everyone to upgrade to v2 and trying to
remove the v1 support esp as some things that I'm doing now simply aren't
possible in v1.

My concern, however, is that all of this is going to break with v3 or maybe
even v2.2, resulting in some plugins requiring more code to deal with the
version than actually do the thing it's actually trying to do.

I wrote a small section about hybrid plugins with some advice.
Feel free to add your thoughts and experiences to it.

Here is the PR:

https://github.com/ansible/ansible/pull/14660

--
Dag

Reply via email to