blob: 70da32dc8f9e6ea43a824a57d077fc50ffd4f919 [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
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 %}