Each form in the forms list is configured with the below attributes.
属性
所有表单类型共有的属性:
属性
说明
name string / 必填 / 唯一
The name of the form alphanumeric + dash + underscore + space
The name of a form is also the identifier of the form and thus must be unique. For simplicity we have chosen not to some sore of guid as unique identifier. This does mean, however, that when your rename a form any reference to it will be broken.
description string
Form description free text
A short description, explaining what the form does.
help string
Help valid markdown
Using markdown you can a more detailed help message to help the operator understand the form.
示例:
1) blockquote with title, list, italic and bold
>#### The quarterly results look great!>> - Revenue was off the chart.> - Profits were higher than ever.>> *Everything* is going according to **plan**.
type string
Form type
Our form eventually sends extravars to a target. That target can be an ansible-playbook, an awx-template, a multistep (a sequence of playbooks/templates), or a subform (a reusable form fragment used as the per-row editor of a list field or the single-object editor of a yaml field).
选项:
ansible
aap
ascender
semaphore
rundeck
jenkins
workflow
awx
multistep
subform
示例:
1) Run AWX Template Create VM
name:Create vmtype:awxroles:-defaultfields:[]template:Create VM
It makes sense that a form has 1 or more formfields. Read more about them in the separate formfield section.
示例:
1) Examples
fields:-name:namelabel:Your nametype:textrequired:true-name:emaillabel:Your emailtype:textregex:expression:'^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$'description:Please enter a valid email addressrequired:true