blob: 476890fe6300bcb2f11d848b686720ccd7ee270a [file] [log] [blame]
Scott Bakerb63ea792016-08-11 10:24:48 -07001---
2- hosts: 127.0.0.1
3 connection: local
4 tasks:
5 - os_server:
6 name: {{ name }}
7 auth:
8 auth_url: {{ endpoint }}
9 username: {{ admin_user }}
10 password: {{ admin_password }}
11 project_name: {{ project_name }}
12 {% if delete -%}
13 state: absent
14 {% else -%}
15 state: present
16 availability_zone: "{{ availability_zone }}"
17 image: {{ image_name }}
18 flavor: {{ flavor_name }}
19 timeout: 200
20 userdata: "{{ user_data }}"
21 config_drive: yes
22 auto_ip: no
23 nics:
24 {% for nic in nics %}
25 - {{ nic.kind }}-id: {{ nic.value }}
26 {% endfor %}
27
28 {% if meta %}
29 meta:
30 {% for k,v in meta.items() %}
31 {{ k }} : "{{ v }}"
32 {% endfor %}
33 {% endif %}
34 {% endif %}
35