Files
product-demos/roles/install_demo/tasks/main.yml
2020-03-10 15:29:12 -04:00

23 lines
753 B
YAML

---
- name: provide info to terminal window
debug:
msg: "install {{demo}} on {{my_tower_host}}"
- name: install all job templates
include_tasks: job_template_loop.yml
loop: "{{dict(hostvars[inventory_hostname]|dictsort|rejectattr('0', 'match', 'ansible_')|selectattr('1.name', 'defined'))|dict2items}}"
when: demo == "all"
- name: install single job template
include_tasks: job_template.yml
when:
- demo != "all"
- hostvars[inventory_hostname][demo].workflow is not defined or not hostvars[inventory_hostname][demo].workflow
- name: install single workflow
include_tasks: workflow.yml
when:
- demo != "all"
- hostvars[inventory_hostname][demo].workflow is defined
- hostvars[inventory_hostname][demo].workflow