blob: 476890fe6300bcb2f11d848b686720ccd7ee270a [file] [log] [blame]
---
- hosts: 127.0.0.1
connection: local
tasks:
- os_server:
name: {{ name }}
auth:
auth_url: {{ endpoint }}
username: {{ admin_user }}
password: {{ admin_password }}
project_name: {{ project_name }}
{% if delete -%}
state: absent
{% else -%}
state: present
availability_zone: "{{ availability_zone }}"
image: {{ image_name }}
flavor: {{ flavor_name }}
timeout: 200
userdata: "{{ user_data }}"
config_drive: yes
auto_ip: no
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 %}