blob: 0cf30df8f0fed6cba21720d6a59227f5b99522bb [file] [log] [blame]
Sapan Bhatiae3556152014-11-19 15:26:11 -05001---
2- hosts: 127.0.0.1
Sapanb15550f2014-12-03 01:27:56 -05003 connection: local
4 tasks:
Sapan Bhatia36fe3bb2014-12-19 14:10:42 -05005 {% if not delete %}
Sapanb15550f2014-12-03 01:27:56 -05006 - nova_keypair:
7 state: present
8 auth_url: {{ endpoint }}
9 login_username: {{ admin_user }}
10 login_password: {{ admin_password }}
11 login_tenant_name: {{ admin_tenant }}
12 name: {{ key_name }}
13 public_key: "{{ key.public_key}}"
Sapan Bhatia36fe3bb2014-12-19 14:10:42 -050014 {% endif %}
Sapanb15550f2014-12-03 01:27:56 -050015 - nova_compute:
Sapanb15550f2014-12-03 01:27:56 -050016 auth_url: {{ endpoint }}
17 login_username: {{ admin_user }}
18 login_password: {{ admin_password }}
19 login_tenant_name: {{ admin_tenant }}
Sapanb15550f2014-12-03 01:27:56 -050020 name: {{ name }}
Sapan Bhatia36fe3bb2014-12-19 14:10:42 -050021 {% if delete %}
22 state: absent
23 {% else %}
24 state: present
25 availability_zone: {{ availability_zone }}
Sapanb15550f2014-12-03 01:27:56 -050026 image_id: {{ image_id }}
27 key_name: {{ key_name }}
28 wait_for: 200
29 flavor_id: {{ flavor_id }}
30 user_data: "{{ user_data }}"
31 nics:
32 {% for net in nics %}
33 - net-id: {{ net }}
34 {% endfor %}
Sapand42e7a22014-12-03 00:03:56 -050035
Sapanb15550f2014-12-03 01:27:56 -050036 {% if meta %}
37 meta:
38 {% for k,v in meta.items() %}
39 {{ k }} : "{{ v }}"
40 {% endfor %}
41 {% endif %}
Sapan Bhatia36fe3bb2014-12-19 14:10:42 -050042 {% endif %}