Skip to main content
SaltStack Support

Executing Multiple Commands at Once


If I have to execute the following three commands, how do I group them so I only have to call one?

salt '*' git.fetch cwd=/var/git/myproject opts='--all' user=git
salt '*' git.pull cwd=/var/git/myproject opts='origin master'
salt '*' nginx.signal reload


You can execute all these in one run separating functions and arguments with a comma: salt '*' cmd1,cmd2,cmd3 ,args1,args2,args3

Here's an example:

salt '*' git.fetch,git.pull,nginx.signal "cwd=/var/git/myproject opts='--all' u
  • Was this article helpful?