workflow test
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: add tower project
|
||||
tower_project:
|
||||
name: "{{item.value.project.name}}"
|
||||
|
||||
@@ -10,4 +10,13 @@
|
||||
|
||||
- name: install single job template
|
||||
include: single_job_template.yml
|
||||
when: demo != "all"
|
||||
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
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: add tower project
|
||||
tower_project:
|
||||
name: "{{hostvars.localhost[demo].project.name}}"
|
||||
@@ -26,7 +27,7 @@
|
||||
tower_host: "{{my_tower_host}}"
|
||||
validate_certs: no
|
||||
when:
|
||||
- workshop_type in item.value.workshop_type
|
||||
- workshop_type in hostvars.localhost[demo].workshop_type
|
||||
- not hostvars.localhost[demo].survey_enabled
|
||||
|
||||
- name: add single job template with survey
|
||||
@@ -46,5 +47,5 @@
|
||||
tower_host: "{{my_tower_host}}"
|
||||
validate_certs: no
|
||||
when:
|
||||
- workshop_type in item.value.workshop_type
|
||||
- workshop_type in hostvars.localhost[demo].workshop_type
|
||||
- hostvars.localhost[demo].survey_enabled
|
||||
|
||||
16
roles/install_demo/tasks/workflow.yml
Normal file
16
roles/install_demo/tasks/workflow.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
#these tasks will install a workflow
|
||||
|
||||
- name: install all job templates in relation to workflow
|
||||
include: add_job_template.yml
|
||||
loop: "{{hostvars[inventory_hostname][demo].job_templates|dict2items}}"
|
||||
|
||||
- tower_workflow_template:
|
||||
name: "{{hostvars[inventory_hostname][demo].name}}"
|
||||
description: "{{hostvars[inventory_hostname][demo].description}}"
|
||||
organization: "{{hostvars[inventory_hostname][demo].organization}}"
|
||||
schema: "{{ hostvars[inventory_hostname][demo].schema}}"
|
||||
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