Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitchen-ansible with extra_vars fail #18

Closed
yewton opened this issue Jun 24, 2015 · 5 comments
Closed

kitchen-ansible with extra_vars fail #18

yewton opened this issue Jun 24, 2015 · 5 comments

Comments

@yewton
Copy link
Contributor

yewton commented Jun 24, 2015

I think kitchen-docker_cli itself is NOT responsible for this issue,
but adding a notice for the issue could be helpful.

If extra_vars specified, kitchen-ansible generates a JSON string(cf. https://github.com/neillturner/kitchen-ansible/blob/2f7aac93023e4e0602c854146c33ab4441c19408/lib/kitchen/provisioner/ansible_playbook.rb#L477-L478 ).
On the other hand, kitchen-docker_cli replaces all ' in the command string to ".
So the result command looks like: -e "{"a": "b"}"
It causes an error 😖

I made a workaround ( https://github.com/yewton/kitchen-docker_cli/commit/c028a0a8fd03e8098986228746d7067b3285f1c8 ), but it seems test-kitchen's wrap_command should do that 😕
I'll more try on it.

Thank you!

marcy-terui pushed a commit that referenced this issue Jun 25, 2015
@marcy-terui
Copy link
Owner

Thanks for reporting.

I think, escape will be better than the replacement.
So, I tried to implement the escape.

Because I do not know how to use the kitchen-ansible, could you try this branch?
https://github.com/marcy-terui/kitchen-docker_cli/tree/kitchen_ansible

@yewton
Copy link
Contributor Author

yewton commented Jun 25, 2015

It works! Thank you//// :laughing:
I wrote a test to ensure that, see https://github.com/yewton/kitchen-docker_cli/commit/142de64d49c2edaec10ce0cf7bed0e751e1da934

@marcy-terui
Copy link
Owner

Good job 👍 Thanks 😄

I'll merge the branch and release it soon.

@marcy-terui
Copy link
Owner

Done. It is released in v0.12.1

Please check the new version :-)

@yewton
Copy link
Contributor Author

yewton commented Jun 26, 2015

Everything goes well.
Many thanks 👍

@yewton yewton closed this as completed Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants