I’m looking for some sample playbooks using most of OpenStack modules. I’ve attempted building my own but found that certain things are unclear to me (like how do I get image id after it’s creation to be used with nova_compute invocation later, etc.)
Quantum module seems to be the most straight-forward as it uses “names” vs “ids” thus making it easy to reference created resources. However most other modules do not so I am looking for some implementation patterns/best practices.
As a side-note - I can’t make glance operate properly even though identical CLI invocation works as expected. I’m assuming I’m missing some piece:
glance_image: login_username={{ keystone_admin_username }}
login_password={{ keystone_admin_password }}
login_tenant_name={{ tenant }}
region_name={{ region }}
auth_url={{ auth_url }}
name=cirros
container_format=bare
disk_format=qcow2
state=present
file=/tmp/images/cirros-0.3.2-x86_64-disk.img
which results in error:
failed: [192.168.0.143] => {“failed”: true}
msg: Error in fetching image list:
even though using .rc file from template:
export OS_USERNAME=“{{ keystone_admin_username }}”
export OS_PASSWORD=“{{ keystone_admin_password }}”
export OS_TENANT_NAME=“{{ tenant }}”
export OS_AUTH_URL=“http://{{ keystone_service_public_ip }}:5000/v2.0/”
export OS_REGION_NAME=“{{ region }}”
works just fine…