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

23 lines
739 B
YAML

---
- name: provide info to terminal window
debug:
msg: "install {{demo}} on {{my_tower_host}}"
- name: install all job templates
include: add_job_template.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: single_job_template.yml
when:
- demo != "all"
- hostvars[inventory_hostname][demo].workflow is undefined or not hostvars[inventory_hostname][demo].workflow
- name: install single workflow
include: workflow.yml
when:
- demo != "all"
- hostvars[inventory_hostname][demo].workflow is defined
- hostvars[inventory_hostname][demo].workflow