Example - Running the Inventory Script
Run the inventory script on its own to generate a list of environments, VMs and VM login credentials:
ansible -i cloudshare-inv.py all -m ping
The output is a JSON document that looks like this:
{ "docker-templates": { "hosts": [ "ubuntu-14-04-server-64-bit-small", "ubuntu-14-04-server-64-bit-medium", "ubuntu-14-04-server-64-bit-large", "ubuntu-16-04-lts-server-small", "ubuntu-16-04-lts-server-medium", "ubuntu-16-04-lts-server-large" ] }, "_meta": { "hostvars": { "login credentials": "will be populated here..." } } }
Here we have one environment called docker-templates
with six VMs.
Comments
0 comments
Article is closed for comments.