salt.modules.yaml

Yaml helper module for troubleshooting yaml

New in version 3005.

depends:

yamllint >= 1.20.0

salt.modules.yaml.lint(source, saltenv=None, pre_render=None, **kwargs)

lint the output after detecting a sucsessful render.

Parameters:
  • source (str) -- managed source file

  • saltenv (str) -- the saltenv to use, defaults to minions enviroment or base if not set

  • pre_render (str) -- The render options passed to slsutil.renderer other wise file is cached and loaded as stream

CLI Example:

salt '*' yaml.lint salt://example/bad_yaml.sls