- name: add tower project tower_project: name: "{{demos[demo].project.name}}" description: "{{demos[demo].project.description}}" organization: "{{demos[demo].project.organization}}" scm_type: "{{demos[demo].project.scm_type}}" scm_url: "{{demos[demo].project.scm_url}}" tower_username: "{{my_tower_username}}" tower_password: "{{my_tower_password}}" tower_host: "{{my_tower_host}}" validate_certs: no - name: add single job template without survey tower_job_template: name: "{{demos[demo].name}}" description: "{{demos[demo].description}}" job_type: "{{demos[demo].job_type}}" inventory: "{{demos[demo].inventory}}" project: "{{demos[demo].project.name}}" playbook: "{{demos[demo].playbook}}" fact_caching_enabled: "{{demos[demo].fact_caching_enabled | default('no')}}" credential: "{{demos[demo].credential}}" survey_enabled: "{{demos[demo].survey_enabled}}" tower_username: "{{my_tower_username}}" tower_password: "{{my_tower_password}}" tower_host: "{{my_tower_host}}" validate_certs: no when: - not demos[demo].survey_enabled - name: add single job template with survey tower_job_template: name: "{{demos[demo].name}}" description: "{{demos[demo].description}}" job_type: "{{demos[demo].job_type}}" inventory: "{{demos[demo].inventory}}" project: "{{demos[demo].project.name}}" playbook: "{{demos[demo].playbook}}" fact_caching_enabled: "{{demos[demo].fact_caching_enabled | default('no')}}" credential: "{{demos[demo].credential}}" survey_enabled: "{{demos[demo].survey_enabled}}" survey_spec: "{{demos[demo].survey_spec}}" tower_username: "{{my_tower_username}}" tower_password: "{{my_tower_password}}" tower_host: "{{my_tower_host}}" validate_certs: no when: - demos[demo].survey_enabled