Skip to content

Instantly share code, notes, and snippets.

@sheldonh
Created October 29, 2013 08:07
Show Gist options
  • Select an option

  • Save sheldonh/7210696 to your computer and use it in GitHub Desktop.

Select an option

Save sheldonh/7210696 to your computer and use it in GitHub Desktop.
---
-
hosts: localhost
connection: local
tasks:
name: Create server instance
local_action:
module: nova_compute
state: present
login_username: "{{ lookup('env', 'OS_USERNAME') }}"
login_password: "{{ lookup('env', 'OS_PASSWORD') }}"
login_tenant_name: "{{ lookup('env', 'OS_TENANT_NAME') }}"
name: "{{ inventory_hostname }}"
image_id: 649246d2-5b8b-4876-b014-63b581b192d7
key_name: "{{ lookup('env', 'LOGNAME') }}"
flavor_id: 2
meta:
hostname: "{{ inventory_hostname }}"
role: rack-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment