33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
- name: add job template without survey
|
|
tower_job_template:
|
|
name: "{{item.value.name}}"
|
|
job_type: "{{item.value.job_type}}"
|
|
inventory: "{{item.value.inventory}}"
|
|
project: "{{item.value.project}}"
|
|
playbook: "{{item.value.playbook}}"
|
|
credential: "{{item.value.credential}}"
|
|
survey_enabled: "{{item.value.survey_enabled}}"
|
|
tower_username: "{{my_tower_username}}"
|
|
tower_password: "{{my_tower_password}}"
|
|
tower_host: "{{my_tower_host}}"
|
|
validate_certs: no
|
|
when:
|
|
- not item.value.survey_enabled
|
|
|
|
- name: add job template with survey
|
|
tower_job_template:
|
|
name: "{{item.value.name}}"
|
|
job_type: "{{item.value.job_type}}"
|
|
inventory: "{{item.value.inventory}}"
|
|
project: "{{item.value.project}}"
|
|
playbook: "{{item.value.playbook}}"
|
|
credential: "{{item.value.credential}}"
|
|
survey_enabled: "{{item.value.survey_enabled}}"
|
|
survey_spec: "{{item.value.survey_spec}}"
|
|
tower_username: "{{my_tower_username}}"
|
|
tower_password: "{{my_tower_password}}"
|
|
tower_host: "{{my_tower_host}}"
|
|
validate_certs: no
|
|
when:
|
|
- item.value.survey_enabled
|