added option to configure Azure Cloud demos

This commit is contained in:
David Rojas
2020-09-26 13:10:33 -07:00
parent 683770889a
commit 4dcf2ee423
5 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
---
- name: add azure credential
tower_credential:
name: azure credential
description: Azure Service Principle
organization: "{{ vars[demo].project.organization }}"
state: present
kind: azure_rm
subscription: "{{ my_subcription }}"
tenant: "{{ my_tenant }}"
client: "{{ my_client }}"
secret: "{{ my_secret }}"
tower_username: "{{ my_tower_username }}"
tower_password: "{{ my_tower_password }}"
tower_host: "{{ my_tower_host }}"
- name: setting the new azure cred to cloud cred var
my_cloud_cred: azure credential

View File

@@ -43,6 +43,7 @@
playbook: "{{ vars[demo].playbook }}"
fact_caching_enabled: "{{ vars[demo].fact_caching_enabled | default('false') }}"
credential: "{{ vars[demo].credential }}"
cloud_credential: "{{ my_cloud_cred | default(omit) }}"
survey_enabled: "{{ vars[demo].survey_enabled }}"
survey_spec: "{{ vars[demo].survey_spec }}"
tower_username: "{{ my_tower_username }}"

View File

@@ -20,6 +20,11 @@
- "demo must be defined and be one of: {{ demo_list }}"
- "full list can be found on https://github.com/ansible/product-demos"
- name: install Azure cred
include_tasks: azure_cred.yml
when:
- azure_demo == True
- name: install all job templates
include_tasks: job_template_loop.yml
loop: "{{ full_demo_info }}"