I have multiple salt states and commands which are executed while other jobs could currently running.
Then I get an error for new jobs, something like:
The function "state.apply" is running as PID 3869 and was started at 2017, Mar 23 10:19:32.691177 with jid 20170323101932691177
Is there a way to wait for other jobs to complete first or to run the job in parallel?
You can queue the execution of salt states:
salt minion_A state.apply some.state queue=True
This will queue the state if any other states are currently running, keep in mind that this option starts a new thread for each queued state run, so use this option sparingly (https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html).