Skip to main content
Surveys provide a user-friendly way to collect input when launching job templates and workflow job templates. Instead of requiring users to write YAML/JSON extra variables, surveys present a form with validation.

Understanding Surveys

A Survey is a set of questions presented to users before launching a job. Survey responses are:
  • Passed as extra variables to the playbook
  • Validated according to defined rules
  • Stored with job history
  • Can be required or optional
  • Support multiple input types

Use Cases

Application Deployment

Prompt for version, environment, branch

Server Provisioning

Collect hostname, IP, region, size

User Management

Ask for username, email, groups

Configuration Changes

Request service name, port, protocol

Survey Question Types

Free-form text input
Best for: Names, URLs, paths

Creating a Survey

1

Create the Survey Specification

A survey specification is a JSON object with name, description, and spec (array of questions):
2

Add Survey to Job Template

  1. Navigate to your job template
  2. Click the Survey tab
  3. Click Add
  4. For each question:
    • Select question type
    • Fill in question details
    • Set variable name
    • Configure validation
  5. Click Save
  6. Toggle Survey Enabled
3

Launch with Survey Responses

When launching a job with a survey, provide answers:
With Ansible:

Survey Validation

Text Validation

Integer Validation

Float Validation

Multiple Choice Validation

The selected value must be one of the defined choices

Multi-Select Validation

Using Survey Variables in Playbooks

Survey responses are available as extra variables:

Advanced Survey Examples

Complete Deployment Survey

Server Provisioning Survey

Survey Best Practices

Clear Questions

Use descriptive question names and helpful descriptions

Sensible Defaults

Provide safe default values for optional fields

Appropriate Types

Use multiple choice for limited options instead of text

Validation Rules

Set min/max constraints to prevent invalid input

Combining with Extra Variables

Survey variables can be combined with job template extra_vars:
Survey variables override job template extra_vars if there are conflicts.

Managing Surveys

View Survey Specification

Update Survey

Delete Survey

Enable/Disable Survey

Workflow Surveys

Workflows can also have surveys:
Workflow survey variables are available to all job templates in the workflow.

Troubleshooting

Verify:
  • Survey is enabled: survey_enabled: true
  • Survey spec is not empty
  • At least one question is defined
Check status:
Common issues:
  • Value outside min/max range
  • Required field not provided
  • Choice not in defined list
  • Wrong data type (string vs integer)
Test validation:
Check:
  • Variable name in survey matches playbook usage
  • Survey is enabled
  • Launch included survey responses
Verify variables received:
For multi-select:
  • Use array in launch: ["option1", "option2"]
  • Default uses newline: "option1\noption2"
  • In playbook, access as list: {{ components }}
Example:

Survey vs Ask on Launch

Comparison:
FeatureSurveyAsk on Launch
User InterfaceCustom formStandard fields
ValidationCustom rulesBasic validation
Variable NamesCustom namesPredefined (inventory, limit, etc.)
Use CaseCustom application variablesJob template settings
Use both together:

Job Templates

Create job templates that use surveys

Workflows

Add surveys to workflow templates

Extra Variables

Learn about variable precedence

Job Launch API

API reference for launching jobs with surveys