loading table of contents...

Headless Server Developer Manual / Version 2310

Table Of Contents

5.1.2 YAML Anchors and Aliases

When using includes, using YAML anchors and aliases is imperative. The contents of the includes should make use of anchors in order to reference the anchored definitions by an alias.

      # Example: anchor a scalar value
      anyProperty: &nameAnchor anchoredContent

      # reuse it by alias:
      anyOtherPropery: *nameAnchor

      # which is equivalent to:
      anyOtherPropery: anchoredContent

Example: anchor a code snippet

      # define a code snippet anchor
      anyProperty: &codeSnippetName
        - a
        - b
        - c

      # reuse the snippet
      myProperty: *codeSnippetName

      # which is equivalent to
        - a
        - b
        - c

Search Results

Table Of Contents

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.