Propiedades comunes de los formularios

Propiedades que comparten todos los tipos de formulario


Estas propiedades se aplican a todos los tipos de formulario: ansible, awx, aap, ascender, semaphore, rundeck, jenkins, workflow, multistep (obsoleto) y subform.

Las demás propiedades son específicas de cada tipo y se documentan en la página del tipo de formulario correspondiente.

Each form in the forms list is configured with the below attributes.


Propiedades

Las propiedades que comparten todos los tipos de formulario:

Atributo Comentarios
name
string / obligatorio / único

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.

Ejemplos:

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).

Opciones:
  • ansible
  • aap
  • ascender
  • semaphore
  • rundeck
  • jenkins
  • workflow
  • awx
  • multistep
  • subform

Ejemplos:

1) Run AWX Template Create VM

name: Create vm
type: awx
roles:
  - default
fields: []
template: Create VM       

2) Run Delete VM playbook

name: Delete vm
type: ansible
roles:
  - default
fields: []
playbook: delete_vm.yaml

3) Run multistep job

name: Trigger awx job
type: multistep
roles:
  - default
fields: []
steps:
- name: Create vm
  type: awx
  template: create_vm        
- name: Start vm
  type: awx
  template: start_vm                                 
fields
array

fields
🔗 valid field object

It makes sense that a form has 1 or more formfields. Read more about them in the separate formfield section.

Ejemplos:

1) Examples

fields:
  - name: name
    label: Your name
    type: text
    required: true
  - name: email
    label: Your email
    type: text
    regex:
      expression: '^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$'
      description: Please enter a valid email address
    required: true