trying alternate method
This commit is contained in:
3
choose_demo.yml
Normal file
3
choose_demo.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
## chose demo or choose all
|
||||
demo: deploy_application
|
||||
13
playbooks/group_vars/all.yml
Normal file
13
playbooks/group_vars/all.yml
Normal 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
|
||||
@@ -8,4 +8,4 @@
|
||||
|
||||
- name: install demo
|
||||
include_role:
|
||||
name: "../roles/deploy_application"
|
||||
name: "../roles/install_demo"
|
||||
@@ -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') }}"
|
||||
30
roles/install_demo/tasks/main.yml
Normal file
30
roles/install_demo/tasks/main.yml
Normal 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
|
||||
Reference in New Issue
Block a user