Skip to content

Instantly share code, notes, and snippets.

@chirauki
Last active November 2, 2018 11:45
Show Gist options
  • Save chirauki/5b4186d5844fe8a79c80cf19d393ddd4 to your computer and use it in GitHub Desktop.
Save chirauki/5b4186d5844fe8a79c80cf19d393ddd4 to your computer and use it in GitHub Desktop.
---
- hosts: localhost
tasks:
- name: Gather all available locations
abiquo_location_facts:
api_url: https://chirauki-master.bcn.abiquo.com/api
api_user: admin
api_pass: xabiquo
verify: no
has: AWS
register: abqlocations
- set_fact:
location: "{{ (abqlocations.locations | selectattr('name', 'equalto', 'AWS eu-west-1') | list)[0] }}"
- debug:
msg: "{{ location.name }}"
- name: Create VDC 'vdc1'
abiquo_datacenter:
api_url: http://localhost:8009/api
api_user: admin
api_pass: xabiquo
name: vdc1
location: "{{ location }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment