You'll learn how to:
Estimated time: 5 minutes
After you install SaltStack, you are immediately ready to run shell commands, update packages, and distribute files to all managed systems simultaneously. As a bonus, all responses are returned in a consistent, configurable format so you can easily see what did and didn’t work.
10 minutes to measurable productivity? Not bad.
Salt lets you remotely execute shell commands across multiple systems using cmd.run:
salt '*' cmd.run 'ls -l /etc'
All managed systems simultaneously and immediately execute this command and then return the output to the Salt master. Feeling the power?
While shelling out using cmd.run is certainly useful, the real power comes when you add Salt execution functions. The Salt community has put tremendous effort into creating hundreds of functions that simplify most management tasks. Even better, the same function can be used consistently across all supported platforms.
Resist the urge to shell out. Learn the ways of the Salt execution functions.
salt '*' disk.usage
salt '*' pkg.install cowsay
salt '*' network.interfaces
These are just a few examples of the many execution functions available.
Good question! In the next section, we’ll introduce the powerful targeting mechanism that lets you run commands on specific groups of systems.