ansible-toolkit icon indicating copy to clipboard operation
ansible-toolkit copied to clipboard

ansible 2.0 support?

Open jkomara opened this issue 8 years ago • 19 comments

Just came across this today and it looks awesome. I tried running it but it looks like it requires runner and the API was rewritten in 2.0, no longer using runner.

Are there any plans to support 2.0?

Thanks.

jkomara avatar Jan 27 '16 08:01 jkomara

:+1: :) Variable precedence has changed a bit in v2 as well, so there might need to be some mods for that.

ghost avatar Jan 27 '16 10:01 ghost

Unfortunately I'm not using Ansible much anymore, but I'd be happy to take a look at PRs with 2.0 support.

dellis23 avatar Jan 27 '16 17:01 dellis23

Are you using something else? Just curious what you decided to go with of you did.

On Wed, Jan 27, 2016 at 9:25 AM -0800, "Dan" [email protected] wrote:

Unfortunately I'm not using Ansible much anymore, but I'd be happy to take a look at PRs with 2.0 support.

— Reply to this email directly or view it on GitHub.

jkomara avatar Jan 29 '16 23:01 jkomara

@jkomara Sorry for the late response. I'm using puppet now. Though I have my beefs with Ansible, the primary reason I've changed is because my employer changed.

dellis23 avatar Feb 08 '16 07:02 dellis23

@jkomara I've added a tox file ( #26 ) which should enable testing against ansible 2.0.

after the PR is merged I can do some work to make it 2.0 compatible.

steenzout avatar Apr 12 '16 19:04 steenzout

#28 addresses this issue.

when merged I'll close this.

steenzout avatar Apr 13 '16 03:04 steenzout

master branch has code to support Ansible 2.0.

a v2.0.0 will follow in a couple of days.

steenzout avatar Apr 13 '16 17:04 steenzout

Awesome! Thank you.

_____________________________

From: Pedro Salgado [email protected] Sent: Wednesday, April 13, 2016 13:38 Subject: Re: [dellis23/ansible-toolkit] ansible 2.0 support? (#22) To: dellis23/ansible-toolkit [email protected] Cc: jkomara [email protected]

Closed #22.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

jkomara avatar Apr 13 '16 20:04 jkomara

There are still two users of ansible.runner - show_vars.py and show_template.py:

Traceback (most recent call last):
  File "/bin/atk-show-vars", line 6, in <module>
    from ansible_toolkit.show_vars import show_vars
  File "/usr/lib/python2.7/site-packages/ansible_toolkit/show_vars.py", line 3, in <module>
    from ansible.runner import Runner
ImportError: No module named runner

opoplawski avatar May 23 '16 21:05 opoplawski

@opoplawski what ansible version are you using?

our tests are passing in ansible 1.9.4 and 2.0.1.0

  • 2.0.1.0 in particular => https://travis-ci.org/dellis23/ansible-toolkit/jobs/127568520

steenzout avatar May 23 '16 21:05 steenzout

oh wait! don't know if the tests cover that code...

steenzout avatar May 23 '16 21:05 steenzout

FWIW - ansible 2.0.2.0.

opoplawski avatar May 23 '16 21:05 opoplawski

tests don't cover the case above : reference here.

need to add tests for this and patch the code...

steenzout avatar May 23 '16 21:05 steenzout

working on this at issue-41 branch.

steenzout avatar May 26 '16 15:05 steenzout

Okay, I'll keep an eye on that then. Still see 4 test failures on that branch at the moment.

opoplawski avatar Jun 06 '16 17:06 opoplawski

yes, I'm still working on this...

steenzout avatar Jun 06 '16 18:06 steenzout

Hi @steenzout, are you still working on that ?

sylr avatar May 24 '17 07:05 sylr

@sylr this ain't a priority for me anymore.

the current work on this is at this branch: https://github.com/dellis23/ansible-toolkit/tree/issue-41

feel free to PR.

steenzout avatar May 24 '17 15:05 steenzout

Needed the atk-vault functionality and don't have the python chops to update this code so instead borrowed heavily from this repo and extracted what I needed. Works with Ansible 2.6.

https://github.com/aioue/pilfer

Needs pathlib and ansible-vault pip packages and has a hardcoded vault password path right now but works the same way as atk-vault. Doesn't use the ansible libraries, but rather a 3rd party wrapper that is currently being supported.

aioue avatar Sep 10 '18 16:09 aioue