Skip to content

Instantly share code, notes, and snippets.

@eumel8
Created November 16, 2016 19:35
Show Gist options
  • Save eumel8/ac781e21838b9df64bdb58e1a32ab829 to your computer and use it in GitHub Desktop.
Save eumel8/ac781e21838b9df64bdb58e1a32ab829 to your computer and use it in GitHub Desktop.
ansible-otc create internal ELB
- include_vars: _elb_secrets.yml
- name: Send request to API
uri:
url: "{{ AUTH_URL_ELB }}"
method: POST
body_format: raw
follow_redirects: all
return_content: yes
validate_certs: yes
HEADER_Content-Type: "application/json"
HEADER_X-Auth-Token: "{{ token['x_subject_token'] }}"
body: "{{ lookup('template', 'roles/elb_create/templates/request.json.j2')|to_json }}"
register: elb
- set_fact:
job_id: "{{ elb['json']['job_id'] }}"
- name: Wait 10 sec
shell: sleep 10
- include: roles/job/tasks/main.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment