Skip to content

Commit

Permalink
Survey options updated (#133)
Browse files Browse the repository at this point in the history
* update docs and add options for alias survey in workflows

* change changelog fragment location

* update lint

* update

* update

* update

* update

* update

* update

* rollback debug

* update to user

* update grammer

* update docs
  • Loading branch information
sean-m-sullivan authored Jan 18, 2021
1 parent 1f93dab commit 4dee708
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelogs/fragments/survey_spec.yml
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions roles/job_templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).|
Expand Down
1 change: 1 addition & 0 deletions roles/workflow_job_templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|

Expand Down
2 changes: 1 addition & 1 deletion roles/workflow_job_templates/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) }}"
Expand Down

0 comments on commit 4dee708

Please sign in to comment.