fixing single job template
This commit is contained in:
@@ -3,10 +3,10 @@
|
|||||||
debug:
|
debug:
|
||||||
msg: "install {{demo}} on {{my_tower_host}}"
|
msg: "install {{demo}} on {{my_tower_host}}"
|
||||||
|
|
||||||
- name: install all job templates
|
# - name: install all job templates
|
||||||
include: add_job_template.yml
|
# include: add_job_template.yml
|
||||||
loop: "{{ demos|dict2items }}"
|
# loop: "{{ demos|dict2items }}"
|
||||||
when: demo == "all"
|
# when: demo == "all"
|
||||||
|
|
||||||
- name: install single job template
|
- name: install single job template
|
||||||
include: single_job_template.yml
|
include: single_job_template.yml
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
- name: add tower project
|
- name: add tower project
|
||||||
tower_project:
|
tower_project:
|
||||||
name: "{{demos[demo].project.name}}"
|
name: "{{hostvars.localhost[demo].project.name}}"
|
||||||
description: "{{demos[demo].project.description}}"
|
description: "{{hostvars.localhost[demo].project.description}}"
|
||||||
organization: "{{demos[demo].project.organization}}"
|
organization: "{{hostvars.localhost[demo].project.organization}}"
|
||||||
scm_type: "{{demos[demo].project.scm_type}}"
|
scm_type: "{{hostvars.localhost[demo].project.scm_type}}"
|
||||||
scm_url: "{{demos[demo].project.scm_url}}"
|
scm_url: "{{hostvars.localhost[demo].project.scm_url}}"
|
||||||
tower_username: "{{my_tower_username}}"
|
tower_username: "{{my_tower_username}}"
|
||||||
tower_password: "{{my_tower_password}}"
|
tower_password: "{{my_tower_password}}"
|
||||||
tower_host: "{{my_tower_host}}"
|
tower_host: "{{my_tower_host}}"
|
||||||
@@ -12,37 +12,37 @@
|
|||||||
|
|
||||||
- name: add single job template without survey
|
- name: add single job template without survey
|
||||||
tower_job_template:
|
tower_job_template:
|
||||||
name: "{{demos[demo].name}}"
|
name: "{{hostvars.localhost[demo].name}}"
|
||||||
description: "{{demos[demo].description}}"
|
description: "{{hostvars.localhost[demo].description}}"
|
||||||
job_type: "{{demos[demo].job_type}}"
|
job_type: "{{hostvars.localhost[demo].job_type}}"
|
||||||
inventory: "{{demos[demo].inventory}}"
|
inventory: "{{hostvars.localhost[demo].inventory}}"
|
||||||
project: "{{demos[demo].project.name}}"
|
project: "{{hostvars.localhost[demo].project.name}}"
|
||||||
playbook: "{{demos[demo].playbook}}"
|
playbook: "{{hostvars.localhost[demo].playbook}}"
|
||||||
fact_caching_enabled: "{{demos[demo].fact_caching_enabled | default('no')}}"
|
fact_caching_enabled: "{{hostvars.localhost[demo].fact_caching_enabled | default('no')}}"
|
||||||
credential: "{{demos[demo].credential}}"
|
credential: "{{hostvars.localhost[demo].credential}}"
|
||||||
survey_enabled: "{{demos[demo].survey_enabled}}"
|
survey_enabled: "{{hostvars.localhost[demo].survey_enabled}}"
|
||||||
tower_username: "{{my_tower_username}}"
|
tower_username: "{{my_tower_username}}"
|
||||||
tower_password: "{{my_tower_password}}"
|
tower_password: "{{my_tower_password}}"
|
||||||
tower_host: "{{my_tower_host}}"
|
tower_host: "{{my_tower_host}}"
|
||||||
validate_certs: no
|
validate_certs: no
|
||||||
when:
|
when:
|
||||||
- not demos[demo].survey_enabled
|
- not hostvars.localhost[demo].survey_enabled
|
||||||
|
|
||||||
- name: add single job template with survey
|
- name: add single job template with survey
|
||||||
tower_job_template:
|
tower_job_template:
|
||||||
name: "{{demos[demo].name}}"
|
name: "{{hostvars.localhost[demo].name}}"
|
||||||
description: "{{demos[demo].description}}"
|
description: "{{hostvars.localhost[demo].description}}"
|
||||||
job_type: "{{demos[demo].job_type}}"
|
job_type: "{{hostvars.localhost[demo].job_type}}"
|
||||||
inventory: "{{demos[demo].inventory}}"
|
inventory: "{{hostvars.localhost[demo].inventory}}"
|
||||||
project: "{{demos[demo].project.name}}"
|
project: "{{hostvars.localhost[demo].project.name}}"
|
||||||
playbook: "{{demos[demo].playbook}}"
|
playbook: "{{hostvars.localhost[demo].playbook}}"
|
||||||
fact_caching_enabled: "{{demos[demo].fact_caching_enabled | default('no')}}"
|
fact_caching_enabled: "{{hostvars.localhost[demo].fact_caching_enabled | default('no')}}"
|
||||||
credential: "{{demos[demo].credential}}"
|
credential: "{{hostvars.localhost[demo].credential}}"
|
||||||
survey_enabled: "{{demos[demo].survey_enabled}}"
|
survey_enabled: "{{hostvars.localhost[demo].survey_enabled}}"
|
||||||
survey_spec: "{{demos[demo].survey_spec}}"
|
survey_spec: "{{hostvars.localhost[demo].survey_spec}}"
|
||||||
tower_username: "{{my_tower_username}}"
|
tower_username: "{{my_tower_username}}"
|
||||||
tower_password: "{{my_tower_password}}"
|
tower_password: "{{my_tower_password}}"
|
||||||
tower_host: "{{my_tower_host}}"
|
tower_host: "{{my_tower_host}}"
|
||||||
validate_certs: no
|
validate_certs: no
|
||||||
when:
|
when:
|
||||||
- demos[demo].survey_enabled
|
- hostvars.localhost[demo].survey_enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user