Skip to content

Commit

Permalink
Templates update
Browse files Browse the repository at this point in the history
  • Loading branch information
jfilipcz committed Sep 17, 2021
1 parent 339f6d1 commit 62b8172
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
16 changes: 15 additions & 1 deletion roles/ansible/tower/manage-schedules/templates/schedule.j2
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
{
"rrule": "{{ schedule.rrule }}",
"name": "{{ schedule.name }}",
"description": "{{ schedule.description | default('') }}",
{% if schedule.description is defined %}
"description": "{{ schedule.description }}",
{% endif %}
{% if schedule.extra_data is defined %}
"extra_data": {{ schedule.extra_data | default("{}") | to_json }},
{% endif %}
{% if schedule.inventory is defined %}
"inventory": "{{ schedule.inventory | default() }}",
{% endif %}
{% if schedule.scm_branch is defined %}
"scm_branch": "{{ schedule.scm_branch | default('') }}",
{% endif %}
"job_type": null,
"job_tags": "",
"skip_tags": "",
{% if schedule.limit is defined %}
"limit": "{{ schedule.limit | default('') }}",
{% endif %}
"diff_mode": null,
"verbosity": null,
{% if unified_job_template_id is defined %}
"unified_job_template": "{{ unified_job_template_id | default('') }}",
{% endif %}
{% if schedule.enabled is defined %}
"enabled": {{ schedule.enabled | default(true)| bool | lower }}
{% endif %}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
{
"extra_data": {},
"inventory": null,
"job_type": null,
"job_tags": "",
"skip_tags": "",
"limit": "",
"diff_mode": null,
"verbosity": null,
"credential": null,
"unified_job_template": {{ job_template_id }}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"name": "{{ workflow_template.name }}",
{% if workflow_template.description is defined %}
"description": "{{ workflow_template.description | default('') }}",
{% endif %}
{% if workflow_template.extra_vars is defined %}
"extra_vars": "{{ workflow_template.extra_vars | default('') }}",
{% endif %}
"organization": null,
{% if workflow_template.allow_simultaneous is defined %}
"allow_simultaneous": "{{ workflow_template.allow_simultaneous | default(true) }}",
{% endif %}
{% if workflow_template.ask_variables_on_launch is defined %}
"ask_variables_on_launch": {{workflow_template.ask_variables_on_launch | default(false) }},
{% endif %}
{% if workflow_template.webhook_service is defined %}
"webhook_service": "{{ workflow_template.webhook_service | default('') }}"
{% endif %}
}

0 comments on commit 62b8172

Please sign in to comment.