Skip to content

Instantly share code, notes, and snippets.

@halberom
Created January 8, 2014 20:03
Show Gist options
  • Save halberom/8323584 to your computer and use it in GitHub Desktop.
Save halberom/8323584 to your computer and use it in GitHub Desktop.
temp example
---
# Creates Digital Ocean Droplet
- name: 'Create Digital Ocean Droplet'
digital_ocean: >
state=active
command=droplet
name={{droplet_name}}
client_id={{client_id}}
api_key={{api_key}}
size_id=66
ssh_key_ids={{ssh_key_id}}
region_id={{region}}
image_id=473123
wait_timeout=6000
wait=yes
register: droplet
- name: 'More Info'
debug: msg="{{droplet}}"
- name: 'Droplet information'
debug: msg="ID {{ droplet.droplet.id }}, name {{ droplet.droplet.name }}"
- name: 'Droplet information2'
debug: msg="ip {{ droplet.droplet.ip_address }}"
- name: 'Add newly created droplet to inventory'
add_host: name={{ droplet.droplet.ip_address }} groups=nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment