Skip to content

Instantly share code, notes, and snippets.

@hagbarddenstore
Forked from anonymous/gist:4be1e29b5ebf14d39b59
Last active October 19, 2015 10:37
Show Gist options
  • Save hagbarddenstore/ccef5d3bf7fd9db0612f to your computer and use it in GitHub Desktop.
Save hagbarddenstore/ccef5d3bf7fd9db0612f to your computer and use it in GitHub Desktop.
---
- hosts: all
sudo: true
vars_files:
- vars.yml
tasks:
- uri:
url: "https://api.serverpilot.io/v1/servers"
user: "{{ spclientid }}"
password: "{{ spapikey }}"
return_content: yes
method: POST
force_basic_auth: yes
HEADER_Content-Type: "application/json"
body: "{\"name\": \"{{ host_variable }}\"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment