controller_templates.yml.j2 template

This template will need some adjustments for a template that you add to the organization, preferably this template will be a funtional example for each new team.
I'm using a non-destructive website check as an example template that works and they can run without harming anything.

---
{% set curr_env=curr_file.split(',')[0] %}
{% if code_environment_vars[curr_env]['templates'] | length > 0  %}
controller_templates_{{ curr_env }}:
  {% for item in code_environment_vars[curr_env]['templates'] %}
  - name: {{ organization_short_name | upper }}_demo_template
    description:
    organization: {{ organization_long_name | upper }}
    project: {{ organization_short_name | upper }}_demo_project
    inventory: {{ organization_short_name | upper }}_demo_inventory
    playbook: main.yml
    job_type: run
    fact_caching_enabled: false
    credentials:
      - {{ organization_short_name | upper }}_vault
    concurrent_jobs_enabled: false
    ask_scm_branch_on_launch: false
    ask_tags_on_launch: false
    ask_verbosity_on_launch: false
    ask_variables_on_launch: false
    extra_vars:
    execution_environment: Default execution environment
    survey_enabled: false
    survey_spec:
      name: ''
      description: ''
      spec:
        - question_name: Which Site to check?
          question_description: ''
          required: true
          type: text
          variable: site_to_check
          min: 0
          max: 60
          default: ''
          choices: ''
          new_question: false
        - question_name: What protocol?
          question_description: ''
          required: true
          type: multiplechoice
          variable: protocol
          min: 0
          max: 60
          default: ''
          choices:
            - http
            - https
          new_question: false
  {% endfor %}
{% else %}
controller_templates_{{ curr_env }}: []
{% endif %}
...

Back