Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- version: '2.0'
- create_vm:
- description: Simple workflow example
- input:
- - vm_name
- - image_ref
- - flavor_ref
- - nics
- net-id: xxxxxxx
- output:
- vm_id: "{{ _.vm_id }}"
- vm_status: <% $.vm_status %>
- tasks:
- create_server:
- action: nova.servers_create name=<% $.vm_name %> image=<% $.image_ref %> flavor=<% $.flavor_ref %>
- input:
- nics: <% $.nics %>
- publish:
- vm_id: <% task().result.id %>
- on-success:
- - wait_for_instance
- wait_for_instance:
- action: nova.servers_find id={{ _.vm_id }} status='ACTIVE'
- retry:
- delay: 5
- count: 15
- publish:
- vm_status: "{{ task().result.status }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement