Last active
December 28, 2015 22:39
-
-
Save laprice/7573168 to your computer and use it in GitHub Desktop.
Functioning playbook to create a VM on digital ocean.
Substitute your ssh_key_ids and image_id and run as is. You will need dopy installed.
This file contains hidden or 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
| --- | |
| - hosts: 127.0.0.1 | |
| connection: local | |
| gather_facts: false | |
| tasks: | |
| - name: start a droplet | |
| local_action: digital_ocean | |
| state=present | |
| ssh_key_ids=#,#,# | |
| command=droplet | |
| name=#validdnsname# | |
| virtio=yes | |
| wait=yes | |
| unique_name=yes | |
| size_id=66 | |
| region_id=3 | |
| image_id=#### | |
| wait_timeout=500 | |
| register: digital_ocean | |
| - debug: msg="ID = {{ digital_ocean.droplet.id }}" | |
| - debug: msg="IP = {{ digital_ocean.droplet.ip_address}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment