Formularios de AWX
Formularios que lanzan una plantilla de job de AWX, AAP o Ascender
Runs a job or workflow template on AWX, Ansible Automation Platform or Ascender: the one template names, on the runner named with runner: (awx: is its old name), or on the default awx runner. aap and ascender are the same type under their own name. The jobs list says where each job ran.
Awx Form
- name: Delete a vm
roles: # reference to roles defined earlier
- vmware
description: Delete a virtual machine
help: This Form deletes a virtual machine.
showHelp: true # show help on load
image: https://picsum.photos/64 # an image url (can be base64)
categories: # reference to categories defined earlier
- Demo
- Vmware
- Decommissioning/Linux # Add to a subcategory using the `/` separator
tileClass: bg-danger # a bootstrap background color style (https://getbootstrap.com/)
template: remove_vm # template to launch (only if type = awx)
inventory: inventory # optional awx inventory
check: false # run in checkmode or not
diff: false # show differences
tags: vm,delete # optional ansible tags (comma separated)
type: awx # type is awx or ansible
onSubmit: # event handler on form submit
- clear: 0 # clear form after 0 seconds
- hide: 1 # hide form after 1 second
onSuccess: # event handler on form success
- load: 1,Another Form # load another form after 1 second
onFailure: # event handler on job failure
- show: 2 # show the form after 2 seconds
onAbort: # event handler on job failure
- reload: 3 # reload the form after 3 seconds
fieldGroupClasses: # give fieldgroups a custom background
groupname1: bg-info-subtle
groupname2: bg-success-subtle
fields: # list of field objects
- name: vm_name
type: textPropiedades
Propiedades específicas de type: awx, además de las propiedades comunes de los formularios.
Basic
| Atributo | Comentarios |
|---|---|
| roles array / obligatorio | Who has access You can have RBAC by adding roles to a form. If you want everyone to see the form, add the Ejemplos: 1) Give access to vmware team |
| categories array | Categories By adding one or more categories, you can group forms together in categories. Ejemplos: 1) Category vmware |
| template string | Template (or job) What the runner runs: an AWX job or workflow template (type awx, aap, ascender), a Semaphore template (its name or id), a Rundeck or Jenkins job. Note: You can also dynamically set the template by using a field called Ejemplos: 1) Run AWX Template Helloworld 2) Use dynamic template name |
| job string | Job (or template) The same as Note: A field called Ejemplos: 1) Run a Rundeck job |
| credentials object añadido en la versión 4.0.16 | Send credentials to your playbook/template From the earlier versions, you could send credentials, stored in AnsibleForms, by using the field-property Ejemplos: 1) Send vmware and microsoft credentials 2) Dynamically send credentials |
| wizard array añadido en la versión 6.4.0 | Wizard steps (form-layer) Turn a form into a multi-page wizard. Ejemplos: 1) Three-step wizard 2) Wizard mapped one-to-one onto multistep (defaultModel + key) |
| varsFiles array añadido en la versión 6.1.0 | Load YAML files as constants Load one or more YAML files as constants that will be merged with the base config constants. Files must contain a dictionary (not a list) and must have .yml or .yaml extension. Path Resolution:
Use Cases:
Note: Files are merged in order. Later files override earlier ones if keys conflict. Variables from varsFiles are merged with base config constants. Ejemplos: 1) Load single vars file 2) Load multiple vars files with absolute paths 3) Mix relative and absolute paths |
Interaction
| Atributo | Comentarios |
|---|---|
| approval object | Add approval point AnsibleForms allows to add an approval point before a job is ran. |
| notifications object | Add Notification Add notifications on job status events: by email ( Ejemplos: 1) Send on success 2) Post to Slack and Teams when it fails |
| onSubmit array añadido en la versión 3.1.0 | Events on submit Once a job is launched, AnsibleForms has a few status events you can act on.
Follow the link above to learn about the possible job status actions Ejemplos: 1) Examples |
| onSuccess array añadido en la versión 3.1.0 | Events on success Once a job is launched, AnsibleForms has a few status events you can act on.
Follow the link above to learn about the possible job status actions Ejemplos: 1) Examples |
| onFailure array añadido en la versión 3.1.0 | Events on failure Once a job is launched, AnsibleForms has a few status events you can act on.
Follow the link above to learn about the possible job status actions Ejemplos: 1) Examples |
| onAbort array añadido en la versión 3.1.0 | Events on abort Once a job is launched, AnsibleForms has a few status events you can act on.
Follow the link above to learn about the possible job status actions Ejemplos: 1) Examples |
| onFinish array añadido en la versión 3.1.0 | Events on finished Once a job is launched, AnsibleForms has a few status events you can act on.
Follow the link above to learn about the possible job status actions Ejemplos: 1) Examples |
Visualization
| Atributo | Comentarios |
|---|---|
| showHelp boolean | Show Help Show the help by default or collapse the help. Por defecto: true |
| icon string | Form icon You can add a nice icon to your forms. The icon name is a free fontawesome 6 icon. You can find more information at www.fontawesome.com. Ejemplos: 1) Trash icon |
| iconColor string | Icon color Specifies the color of the icon. Use any valid CSS color class name (e.g., primary, success, danger, warning, info, dark, white, …). Ejemplos: 1) Red icon |
| iconSize string | Icon size Specifies the size of the icon. Por defecto: 3x Ejemplos: 1) Large icon |
| overlayIcon string | Overlay icon on main icon Adds a icon on top of the main icon for layering effects. Useful for status indicators or badges. Ejemplos: 1) Server with check overlay |
| overlayIconTransform string | Transform for overlay icon Specifies the transform/positioning for the overlay icon. You can use FontAwesome transform values like shrink, grow, up, down, left, right. Por defecto: shrink-6 up-7 right-7 Ejemplos: 1) Custom positioned overlay |
| overlayIconColor string | Color for overlay icon Specifies the color of the overlay icon. Por defecto: success Ejemplos: 1) Red overlay icon |
| overlayIconCircle boolean | Show circle background behind overlay icon When enabled, shows a colored circle background behind the overlay icon. The circle uses the overlayIconColor, and the icon inside becomes white in light mode or dark in dark mode. When disabled, the overlay icon appears without a circle background. Por defecto: true Ejemplos: 1) Overlay without circle |
| overlayIconText string | Text overlay on icon Adds text as an overlay on the icon. Can be used for badges, counters, or labels. Ejemplos: 1) New badge |
| overlayIconTextPosition string | Position for text overlay Specifies the position of the text overlay. Por defecto: bottom-left Ejemplos: 1) Top right badge |
| overlayIconTextColor string | Color for text overlay Specifies the color of the text overlay. Por defecto: success Ejemplos: 1) Warning badge |
| image string | Form image You can add a nice image to your form. You can provide a local or remote url. But if you are in a secured location, you might want to go for a base64 encode image. This allows you to embed the image in the yaml file. Ejemplos: 1) Microsoft image 2) Internet image 3) Local image |
| tileClass string | Form tile background colour AnsibleForms uses the Bootstrap css framework to style the webapplication. Por defecto: bg-info-subtle Ejemplos: 1) warning color 2) success light color |
| fieldGroupClasses object | Fieldgroup background color AnsibleForms uses the Bootstrap css framework to style the webapplication. Bootstrap has a few color helper classes you can use to give your fieldgroups a background color. You can find them here background color and foreground color. Ejemplos: 1) Color fieldgroup |
| order integer añadido en la versión 5.1.0 | Order of the form in the list The order of the form in the list of forms. Forms are sorted by this order, so you can have a specific order in the list. Note: If you do not set this property, it will be ordered alphabetically by name. |
Workflow
| Atributo | Comentarios |
|---|---|
| inventory string | Inventory In both awx and ansible core you can pass an inventory. In the case of ansible core, it will be a yaml file. In case of awx it will be the inventory name. Ansible: the name of an inventory of the designer’s Inventories section ( Note: You can also dynamically set the inventory by using a field called Ejemplos: 1) Run against an inventory of the designer |
| executionEnvironment string añadido en la versión 5.0.0 | Execution Environment In newer versions of AWX you can choose an execution environment. Use this property to pass it to your template. Note: You can also dynamically set the executionEnvironment by using a field called |
| instanceGroups array or string añadido en la versión 5.0.0 | Instance Groups In newer versions of AWX you can choose instance groups. Use this property to pass it to your template. Note: You can also dynamically set the instanceGroups by using a field called |
| scm_branch string añadido en la versión 5.0.0 | SCM Branch Awx allows to pass the scm branch. Use this property to pass it to your template. Note: You can also dynamically set the scm branch by using a field called |
| runner string añadido en la versión 7.0.0 | Where the job runs The runner that runs this form’s job, of the type the form’s type asks for: rte (a runtime environment container) for A disabled runner (its Enabled switch off) fails the job, also when it is the default: there is no fallback to another runner. A role’s Semaphore: a form of type semaphore runs the Semaphore template named by Rundeck: a form of type rundeck runs the Rundeck job named by Jenkins: a form of type jenkins builds the Jenkins job named by Ejemplos: 1) Run on the vmware runtime 2) Run a template on a named AAP 3) Run a Semaphore template 4) Run a Rundeck job 5) Build a Jenkins job |
| awx string añadido en la versión 6.0.0 | Deprecated alias of runner Deprecated since 7, removed in 8. Use Note: you can also set these dynamically by using a field called Ejemplos: 1) Add awx instance to your template |
| awxCredentials array añadido en la versión 4.0.16 | Add awx credentials to your template In AWX you can set credentials on your template. Note: you can also set these dynamically by using the a field name awxCredentials. It must be sent as extravar. If this extravar is found it will overwrite the static awxCredentials. Ejemplos: 1) Add awx credentials to your template 2) Dynamically send credentials |
| check boolean | Run in check mode In both awx and ansible core you run a playbook in check mode. Enable this attribute to do so. Note: You can also dynamically set the check mode by using a field called |
| limit string | Run against a limited number of hosts In awx and ansible core you run a playbook against limited hosts by supplying a host pattern. Use this attribute to do so. Note: You can also dynamically set the limit by using a field called |
| diff boolean | Run in diff mode In both awx and ansible core you run a playbook in diff mode. Enable this attribute to do so. Note: You can also dynamically set the check mode by using a field called |
| userExtravars string | Which keys of the user go into the extravars Overrides the Leave it out and the form follows the global setting. Note: a multistep applies the form’s value to every step, including the partial extravars a step receives through |
| abortable boolean añadido en la versión 5.0.8 | Allow aborting the job By default you can allow the user to abort the job. Use this attribute to disable this behaviour. Por defecto: true |
| allowRelaunch boolean añadido en la versión 6.2.0 | Allow relaunching the job By default, users with the Por defecto: true Ejemplos: 1) Prevent relaunching a form |
| launchValidation string añadido en la versión 6.4.1 | Check every launch of this form on the server Checks every launch of this form on the server against its validation rules, with the same engine the browser and the MCP server use - see the Set it on a form that is launched over the REST API: with Mind the fields the server computes again: a timestamp ( The stricter of this property and A wizard form is checked step by step: every step the browser submits is resolved against its subform. See the Launch validation page of the documentation. Por defecto: the LAUNCH_VALIDATION environment variable Ejemplos: 1) A form that is launched over REST |
| enableForChat boolean añadido en la versión 6.5.0 | Offer this form in the chat assistant The chat assistant ( The assistant fills the form in with the user, through the same form engine as the browser, and never launches it: the user clicks Launch on the exact payload the chat showed. Not for wizard forms. Por defecto: false Ejemplos: 1) A form the chat may offer |
| string | Set tags In both awx and ansible core you can pass tags. Use this attribute to pass a comma separted list of tags. Note: You can also dynamically set the tags by using a field called |