22.22.5.1.12. salt.renderers.yamlex

YAMLEX renderer is a replacement of the YAML renderer. It's 100% YAML with a pinch of Salt magic:

  • All mappings are automatically OrderedDict
  • All strings are automatically str obj
  • data aggregation with !aggregation yaml tag, based on the salt.utils.aggregation module.
  • data aggregation over documents for pillar

Instructed aggregation within the !aggregation and the !reset tags:

#!yamlex
foo: !aggregate first
foo: !aggregate second
bar: !aggregate {first: foo}
bar: !aggregate {second: bar}
baz: !aggregate 42
qux: !aggregate default
!reset qux: !aggregate my custom data

is roughly equivalent to

foo: [first, second]
bar: {first: foo, second: bar}
baz: [42]
qux: [my custom data]

22.22.5.1.12.1. Reference

salt.renderers.yamlex.render(sls_data, saltenv='base', sls='', **kws)

Accepts YAML_EX as a string or as a file object and runs it through the YAML_EX parser.

Return type:A Python data structure

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Table Of Contents

Previous topic

22.22.5.1.11. salt.renderers.yaml

Next topic

22.23. Returners

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.