-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Added a Docker Machine dynamic inventory plugin #54946
Conversation
Thanks for creating this PR! Unfortunately, it only contains a symlink to a file not included: |
Apologies for that silly mistake. Corrected. |
The test
The test
The test
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some quick comments for tonight. ansibot also listed some problems from the CI runs.
No problem! Thanks again for submitting this. Please note that Feature Freeze for Ansible 2.8 is coming up very soon (Thursday, April 11), so the chances for this PR making it into Ansible 2.8 aren't very high. I'll try to give you more feedback tomorrow (gotta go sleeping now), but be warned that I don't have any experience with docker machine. PS: there are more places where you can improve formatting using the syntax from the link. I just didn't want to mark everything now ;) |
The test
The test
The test
|
Thx, v appreciated. FYI this is where I am using Docker Machine and this is where I invoke Ansible with my Docker Machine dynamic inventory plugin, and this is a playbook that references the created variables. Perhaps it helps to see it used.
I took a look at the Docker Swarm inventory plugin docs and added a few more uses of the link syntax. |
What do you think about renaming |
The test
|
Great work, thank you very much @felixfontein! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
rebuild_merge |
@ximon18 thanks for contributing this inventory plugin! And sorry it took so long to get it merged :) It will be included in Ansible 2.9, to be released this fall/winter. @WojciechowskiPiotr @s-hertel @mattclay @bcoca thanks a lot for your input and for reviewing! |
Thankyou @bcoca, and in particular thanks to @felixfontein without whom this would have taken much longer, been much less clear how to proceed and would have been a poorer contribution overall! |
SUMMARY
Added a new dynamic inventory plugin to integrate Ansible with Docker Machine, just like the existing Docker Swarm dynamic inventory plugin in Ansible 2.8.
ISSUE TYPE
COMPONENT NAME
docker_machine.py
ADDITIONAL INFORMATION
See https://github.com/ximon18/ansible-docker-machine-inventory-plugin for more information.
The intent of this PR is to begin the process of proposing the module for inclusion in Ansible core. However, there are no unit or integration tests yet. The docker_swarm inventory plugin has integration
tests but has some concerning note in its 'aliases' file about disabling docker due to test instability and also I wouldn't know at this point how to get Docker Machine installed on the integration test platform. I did not find any unit tests for the existing docker_swarm inventory plugin to use as a basis for my own module.
Tested with Ansible 2.7.10, Docker Machine 0.16.0, Python 3.6.7 on Ubuntu 18.04.2 LTS.
Thanks,
Ximon