Add playbook for creating a DigitalOcean droplet
This commit is contained in:
parent
5a8a63acd8
commit
1260247e48
21
tools/ansible/digitalocean.yml
Normal file
21
tools/ansible/digitalocean.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
- ./vars/digitalocean_vault.yml
|
||||
- ./vars/digitalocean_vars.yml
|
||||
|
||||
tasks:
|
||||
- name: Create a Droplet
|
||||
digital_ocean_droplet:
|
||||
state: present
|
||||
name: oliverdavies-uk
|
||||
oauth_token: '{{ digitalocean_api_key }}'
|
||||
size: 1gb
|
||||
region: lon1
|
||||
image: ubuntu-16-04-x64
|
||||
wait_timeout: 500
|
||||
register: droplet
|
||||
|
||||
- debug: var=droplet
|
2
tools/ansible/vars/digitalocean_vars.yml
Normal file
2
tools/ansible/vars/digitalocean_vars.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
digitalocean_api_key: '{{ vault_digitalocean_api_key }}'
|
10
tools/ansible/vars/digitalocean_vault.yml
Normal file
10
tools/ansible/vars/digitalocean_vault.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
38626265316535333565366130303464633230616533393961636362643132343838323934666162
|
||||
6436353232363239643235393539653431336638646163350a653864623362306366663638333637
|
||||
36666339333530623764313261393665383561303735373565323461353766366635383835623466
|
||||
6535373364306131350a613165666565613033383064393436613265633665393266613863323766
|
||||
30383238333833376265373530663532363063623535663066313836306332383836353165643134
|
||||
62653737386231306361353365643962356663343631353634383436353631323131363333663439
|
||||
30393965666230663565613039333733626231353530336666306663336430346538636365386264
|
||||
61636563386434376363653738393838303735356235306437643132613732653633363538383535
|
||||
3866
|
Loading…
Reference in a new issue