Skip to content

Instantly share code, notes, and snippets.

@wgordon17
Created February 7, 2017 16:36
Show Gist options
  • Save wgordon17/d4b189ea501b56e7668ae165d97fcdb8 to your computer and use it in GitHub Desktop.
Save wgordon17/d4b189ea501b56e7668ae165d97fcdb8 to your computer and use it in GitHub Desktop.

Full field template

field

The name of the variable to output for ansible yaml file

  • string
  • required
  • default: None

label

The human-friendly value of field to show in the form

  • string
  • optional
  • default: value of field

is_public

Flag determining whether this field should show to the customer, or only to operations

  • boolean
  • optional
  • default: False

is_optional

Flag determining whether this field can be empty when the form is submitted

  • boolean
  • optional
  • default: False

description

Customer facing description of how this field is used

  • string
  • optional
  • default: None

internal_comments

Operations-only facing comments

  • string
  • optional
  • default: None

default

The default value to be pre-filled for required fields

  • matches format
  • optional
  • default: None

values

A list of potential values to populate a drop-down field; forces to dropdown

  • dropdown (yaml list)
  • optional
  • default: None

has

Specifies a sub-component that is applied to this field The markup uses regex expressions to specify how/if component repeats

  • string (provides the component name)
  • optional
  • default: None

format

The format in which to display content

  • valid types:
    • text
    • textarea
    • email
    • number
    • date
    • list
    • dropdown
    • cidr
  • optional
  • default: text

"Special" commands

  • function()
    • Provides the function return value(s) as content accepts and passes all variables named in the original function
  • lookup()
    • Provides the current set value as content
  • case:
    • Provides a conditional mechanism wherein you can utilize lookup(), and then specify content depending on the value

Regex

     + - 1 or more
     ? - 0 or 1
     * - 0 or more
   {x} - exactly x
{x, y} - at least x, but no more than y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment