Created
January 8, 2014 20:03
-
-
Save halberom/8323584 to your computer and use it in GitHub Desktop.
temp example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# 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