snippetbashTip
salt — Execute commands and assert state on remote salt minions. More information: <https://docs.saltprojec
Viewed 0 times
commandcommandsassertandsaltexecutestatecli
Problem
How to use the
salt command: Execute commands and assert state on remote salt minions. More information: <https://docs.saltproject.io/en/latest/ref/cli/index.html>.Solution
salt — Execute commands and assert state on remote salt minions. More information: <https://docs.saltproject.io/en/latest/ref/cli/index.html>.List connected minions:
salt '*' test.pingExecute a highstate on all connected minions:
salt '*' state.highstateUpgrade packages using the OS package manager (apt, yum, brew) on a subset of minions:
salt '*.example.com' pkg.upgradeExecute an arbitrary command on a particular minion:
salt '{{minion_id}}' cmd.run "ls "Code Snippets
List connected minions
salt '*' test.pingExecute a highstate on all connected minions
salt '*' state.highstateUpgrade packages using the OS package manager (apt, yum, brew) on a subset of minions
salt '*.example.com' pkg.upgradeExecute an arbitrary command on a particular minion
salt '{{minion_id}}' cmd.run "ls "Context
tldr-pages: common/salt
Revisions (0)
No revisions yet.