diff --git a/tools/ansible/digitalocean.yml b/tools/ansible/digitalocean.yml new file mode 100644 index 0000000..40448e0 --- /dev/null +++ b/tools/ansible/digitalocean.yml @@ -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 diff --git a/tools/ansible/vars/digitalocean_vars.yml b/tools/ansible/vars/digitalocean_vars.yml new file mode 100644 index 0000000..bcbda9a --- /dev/null +++ b/tools/ansible/vars/digitalocean_vars.yml @@ -0,0 +1,2 @@ +--- +digitalocean_api_key: '{{ vault_digitalocean_api_key }}' diff --git a/tools/ansible/vars/digitalocean_vault.yml b/tools/ansible/vars/digitalocean_vault.yml new file mode 100644 index 0000000..368b1b5 --- /dev/null +++ b/tools/ansible/vars/digitalocean_vault.yml @@ -0,0 +1,10 @@ +$ANSIBLE_VAULT;1.1;AES256 +38626265316535333565366130303464633230616533393961636362643132343838323934666162 +6436353232363239643235393539653431336638646163350a653864623362306366663638333637 +36666339333530623764313261393665383561303735373565323461353766366635383835623466 +6535373364306131350a613165666565613033383064393436613265633665393266613863323766 +30383238333833376265373530663532363063623535663066313836306332383836353165643134 +62653737386231306361353365643962356663343631353634383436353631323131363333663439 +30393965666230663565613039333733626231353530336666306663336430346538636365386264 +61636563386434376363653738393838303735356235306437643132613732653633363538383535 +3866