diff --git a/changelogs/fragments/survey_spec.yml b/changelogs/fragments/survey_spec.yml new file mode 100644 index 000000000..dfa99026b --- /dev/null +++ b/changelogs/fragments/survey_spec.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - updated documentation on surveys for workflows and job templates + - added alias option for survey to survey_spec in workflows. diff --git a/roles/job_templates/README.md b/roles/job_templates/README.md index 7000590da..586273e22 100644 --- a/roles/job_templates/README.md +++ b/roles/job_templates/README.md @@ -65,6 +65,7 @@ tower_configuration_job_templates_secure_logging defaults to the value of tower_ |`ask_credential_on_launch`|""|no|bool|Prompt user for credential on launch.| |`survey_enabled`|""|no|bool|Enable a survey on the job template.| |`survey_spec`|""|no|dict|JSON/YAML dict formatted survey definition.| +|`survey`|""|no|dict|JSON/YAML dict formatted survey definition. Alias of survey_spec| |`become_enabled`|""|no|bool|Activate privilege escalation.| |`allow_simultaneous`|""|no|bool|Allow simultaneous runs of the job template.| |`timeout`|""|no|int|Maximum time in seconds to wait for a job to finish (server-side).| diff --git a/roles/workflow_job_templates/README.md b/roles/workflow_job_templates/README.md index 0c8e771a2..ca13821c6 100644 --- a/roles/workflow_job_templates/README.md +++ b/roles/workflow_job_templates/README.md @@ -52,6 +52,7 @@ workflow_job_templates_secure_logging defaults to the value of tower_genie_secur |`state`|`present`|no|str|Desired state of the resource.| |`survey_enabled`|""|no|bool|Enable a survey on the job template.| |`survey_spec`|""|no|dict|JSON/YAML dict formatted survey definition.| +|`survey`|""|no|dict|JSON/YAML dict formatted survey definition. Alias of survey_spec| |`webhook_service`|""|no|str|Service that webhook requests will be accepted from (github, gitlab)| |`webhook_credential`|""|no|str|Personal Access Token for posting back the status to the service API| diff --git a/roles/workflow_job_templates/tasks/main.yml b/roles/workflow_job_templates/tasks/main.yml index 5d3d5e2ee..37c7fd9b3 100644 --- a/roles/workflow_job_templates/tasks/main.yml +++ b/roles/workflow_job_templates/tasks/main.yml @@ -20,7 +20,7 @@ webhook_service: "{{ workflow_loop_var.webhook_service | default(omit) }}" webhook_credential: "{{ workflow_loop_var.webhook_credential.name | default(workflow_loop_var.webhook_credential | default(omit)) }}" survey_enabled: "{{ workflow_loop_var.survey_enabled | default('false') }}" - survey: "{{ workflow_loop_var.related.survey_spec | default( workflow_loop_var.survey_spec | default(omit)) }}" + survey: "{{ workflow_loop_var.related.survey_spec | default( workflow_loop_var.survey_spec | default( workflow_loop_var.survey | default(omit))) }}" state: "{{ workflow_loop_var.state | default(tower_state | default('present')) }}" notification_templates_started: "{{ workflow_loop_var.notification_templates_started | default(workflow_loop_var.related.notification_templates_started | default([]) | map(attribute='name') | list ) }}" notification_templates_success: "{{ workflow_loop_var.notification_templates_success | default(workflow_loop_var.related.notification_templates_success | default([]) | map(attribute='name') | list ) }}"