Skip to content

yaml_tags

Tanveer Alam edited this page Dec 7, 2019 · 2 revisions

TAGS

Tags:

  • Used for:
    • Setting a custom URI
    • Setting local tags
    • Setting a data type

Set a URI:

  • Use the %TAG ! prefix
%TAG ! tag:hostsdata:phl:
---

Tags provide us with three functions: The ability to assign a universal resource indicator, the ability to assign local tags to that indicator, and the ability to change how the YAML parser reads certain scalars when processing the YAML itself. We first take a look at how to assign a URI using the %TAG header, then we assign some local tags with !, before finally learning how to use the !! indicator to change the data type of a scalar.

Default data types:

  • seq - Sequence
  • map - Map
  • str - String
  • int - Integer
  • float - Floating-point decimal
  • null - Null
  • binary - Binary code
  • omap - Ordered map
  • set - Unordered set

HELM


YAML Essentials


Helm Deep Dive

Clone this wiki locally