Last active
August 29, 2015 14:03
-
-
Save kelvinn/8e11e1a203ecfeb47574 to your computer and use it in GitHub Desktop.
Revisions
-
kelvinn revised this gist
Jul 10, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ unique_name=yes client_id=12345ABCDEF api_key=54321XYZ ssh_key_ids=SSHKEYID_NUM_EG_12345 private_networking=yes size_id=66 region_id=6 -
kelvinn created this gist
Jul 10, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ --- - name: Prepare New Digital Ocean Droplet hosts: you.example.com user: ansible tasks: - action: shell date +%s | sha256sum | base64 | head -c 6 register: rand_var - digital_ocean: > state=present command=droplet name=db-{{ rand_var.stdout }} unique_name=yes client_id=12345ABCDEF api_key=54321XYZ ssh_key_ids=your-ssh-key-name-already-on-do private_networking=yes size_id=66 region_id=6 image_id=3240036 wait_timeout=500 register: my_droplet - debug: msg="ID is {{ my_droplet.droplet.id }}" - debug: msg="IP is {{ my_droplet.droplet.ip_address }}"