Inventory Program 6 - Dynamic Inventory

Content of file "inventory"

$ wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.py
$ ansible -i ec2.py playbook.yaml --key-file=remote.pem -u ec2-user

$ wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack_inventory.py
$ chmod +x openstack_inventory.py
$ ansible -i openstack_inventory.py playbook.yaml --key-file=remote.pem -u ec2-user