| --- |
| - hosts: 127.0.0.1 |
| connection: local |
| tasks: |
| - nova_compute: |
| auth_url: {{ endpoint }} |
| login_username: {{ admin_user }} |
| login_password: {{ admin_password }} |
| login_tenant_name: {{ admin_tenant }} |
| name: {{ name }} |
| {% if delete -%} |
| state: absent |
| {% else -%} |
| state: present |
| availability_zone: {{ availability_zone }} |
| image_name: {{ image_name }} |
| wait_for: 200 |
| flavor_name: {{ flavor_name }} |
| user_data: "{{ user_data }}" |
| config_drive: yes |
| nics: |
| {% for nic in nics %} |
| - {{ nic.kind }}-id: {{ nic.value }} |
| {% endfor %} |
| |
| {% if meta %} |
| meta: |
| {% for k,v in meta.items() %} |
| {{ k }} : "{{ v }}" |
| {% endfor %} |
| {% endif %} |
| {% endif %} |