trying alternate method

This commit is contained in:
ipvsean
2020-02-25 10:11:25 -05:00
parent 193aaabb93
commit fea4d61a04
6 changed files with 47 additions and 28 deletions

3
choose_demo.yml Normal file
View File

@@ -0,0 +1,3 @@
---
## chose demo or choose all
demo: deploy_application

View File

@@ -0,0 +1,13 @@
demos:
deploy_application:
name: "Deploy Application (survey)"
job_type: "run"
inventory: "Workshop Inventory"
project: "Ansible official demo project"
playbook: "01_deploy_application.yml"
credential: "Demo Credential"
survey_enabled: yes
survey_spec: "{{ lookup('file', 'my_survey.json') }}"
workshop_type:
- f5
- rhel

View File

@@ -8,4 +8,4 @@
- name: install demo
include_role:
name: "../roles/deploy_application"
name: "../roles/install_demo"

View File

@@ -1,27 +0,0 @@
---
- name: add tower project
tower_project:
name: "Ansible official demo project"
description: "prescriptive demos from Red Hat Management Buisness Unit"
organization: "Default"
scm_type: git
scm_url: https://github.com/ansible/product-demos
tower_username: "{{my_tower_username}}"
tower_password: "{{my_tower_password}}"
tower_host: "{{my_tower_host}}"
validate_certs: no
- name: add deploy application job template
tower_job_template:
name: "Deploy Application (survey)"
job_type: "run"
inventory: "Workshop Inventory"
project: "Ansible official demo project"
playbook: "roles/deploy_application/tasks/deploy_application.yml"
credential: "Demo Credential"
tower_username: "{{my_tower_username}}"
tower_password: "{{my_tower_password}}"
tower_host: "{{my_tower_host}}"
validate_certs: no
# survey_enabled: yes
# survey_spec: "{{ lookup('file', 'my_survey.json') }}"

View File

@@ -0,0 +1,30 @@
---
- name: add tower project
tower_project:
name: "Ansible official demo project"
description: "prescriptive demos from Red Hat Management Buisness Unit"
organization: "Default"
scm_type: git
scm_url: https://github.com/ansible/product-demos
tower_username: "{{my_tower_username}}"
tower_password: "{{my_tower_password}}"
tower_host: "{{my_tower_host}}"
validate_certs: no
- name: print out values
debug:
msg: "{{demos["demo"].name}}"
# - name: add deploy application job template
# tower_job_template:
# name: "{{demos["demo"].name}}"
# job_type: "{{job_type}}"
# inventory: "{{inventory}}"
# project: "{{project}}"
# playbook: "{{playbook}}"
# credential: "{{credential}}"
# survey_enabled: "{{survey_enabled}}"
# survey_spec: "{{survey_spec}}"
# tower_username: "{{my_tower_username}}"
# tower_password: "{{my_tower_password}}"
# tower_host: "{{my_tower_host}}"
# validate_certs: no