-
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
contribute docker-machine inventory #23149
Conversation
The test
The test
|
This inventory does not implement |
@sivel great -- thanks for looking. I'll implement and make the pep8 + python 2.6 compat fixes as well. |
@sivel I have updated the script to output the below. Do you recommend any changes? I'm not sure if the engine connection info should be stored under hostvars or group vars. Thanks! {
"_meta": {
"hostvars": {
"node-a": {
"ansible_host": "172.16.0.8",
"ansible_port": 22,
"ansible_private_key_file": "/home/acme/.docker/machine/machines/node-a/id_rsa",
"ansible_user": "root",
"docker_engine_host": "tcp://172.16.0.8:2376",
"docker_engine_tlscacert": "/home/acme/.docker/machine/machines/node-a/ca.pem",
"docker_engine_tlscert": "/home/acme/.docker/machine/machines/node-a/cert.pem",
"docker_engine_tlskey": "/home/acme/.docker/machine/machines/node-a/key.pem"
},
"node-b": {
"ansible_host": "172.16.0.9",
"ansible_port": 22,
"ansible_private_key_file": "/home/acme/.docker/machine/machines/node-b/id_rsa",
"ansible_user": "root",
"docker_engine_host": "tcp://172.16.0.9:2376",
"docker_engine_tlscacert": "/home/acme/.docker/machine/machines/node-b/ca.pem",
"docker_engine_tlscert": "/home/acme/.docker/machine/machines/node-b/cert.pem",
"docker_engine_tlskey": "/home/acme/.docker/machine/machines/node-b/key.pem"
}
}
},
"node-a": {
"hosts": [
"node-a"
]
},
"node-b": {
"hosts": [
"node-b"
]
}
} |
Hi,
If you're the PR author, and you want to start the conversation back up, please:
If you're a community member, and you want to see this change merged, please:
If you've like to help with the Docker modules please comment on the Docker Agenda/Task List How to rebase a branch: https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html needs_info |
SUMMARY
A contributed docker-machine inventory script. Polls available docker machines and creates Ansible inventory, including docker engine connection information.
ISSUE TYPE
COMPONENT NAME
contrib/inventory/docker-machine.py
ANSIBLE VERSION
ADDITIONAL INFORMATION