Add Create Infra and Create VM demo
This commit is contained in:
willtome
2022-03-22 17:53:28 -05:00
committed by GitHub
parent cf90f1e145
commit 51273afedd
18 changed files with 478 additions and 5 deletions

25
cloud/create_vm.yml Normal file
View File

@@ -0,0 +1,25 @@
---
- name: Create Cloud Infra
hosts: localhost
gather_facts: no
vars:
vm_name: undef
vm_owner: undef
vm_provider: undef
vm_blueprint: undef
tasks:
- name: "Importing {{ vm_blueprint | upper }} Blueprint"
include_vars:
file: "blueprints/{{ vm_blueprint }}.yml"
- name: "Check Provider Compatibility"
assert:
that: "'{{ vm_provider }}' in {{ vm_blueprint_providers }}"
fail_msg: "{{ vm_blueprint | upper }} is not available for {{ vm_provider | upper }}"
when: "vm_blueprint_providers is defined"
- name: "Building {{ vm_blueprint | upper }} in {{ vm_provider | upper }}"
include_role:
name: "demo.cloud.{{ vm_provider }}"
tasks_from: create_vm