Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to render and dump the file sls with salt stack without applying it

Given how flexible jinja templating can be with saltstack and the numerous pillar variables are merged into the template; I would find it useful to be able to get salt to 'render' the full sls out to screen before i push it out. Is there a way of doing this?

like image 477
yee379 Avatar asked Dec 10 '15 00:12

yee379


People also ask

What is SLS file in salt?

The core of the Salt State system is the SLS, or SaLt State file. The SLS is a representation of the state in which a system should be in, and is set up to contain this data in a simple format. This is often called configuration management.

How do I edit a SLS file?

A wide variety of Microsoft Windows-based text editing and word processing applications can be used to view and edit the content of SLS files, and some of these include the Microsoft Notepad text editor and the Microsoft WordPad word processing application.

What is a salt file?

The Salt file server is a stateless ZeroMQ server. It is built into the Salt master. A Salt file server is used for distributing files from master to minions. It contains different modules.

What is state Saltstack?

State. A reusable declaration that configures a specific part of a system. Each Salt state is defined using a state declaration. State Declaration. A top level section of a state file that lists the state function calls and arguments that make up a state.


1 Answers

Just to answer my own question: I knew that state.show_top existed. So I tried state.show_sls, and voila! Exactly what I'm after.

like image 182
yee379 Avatar answered Oct 24 '22 18:10

yee379