salt.runners.reactor

A convenience system to manage reactors

Beginning in the 2017.7 release, the reactor runner requires that the reactor system is running. This is accomplished one of two ways, either by having reactors configured or by including reactor in the engine configuration for the Salt master.

engines:
  • reactor

salt.runners.reactor.add(event, reactors, saltenv='base', test=None)

Add a new reactor

CLI Example:

salt-run reactor.add 'salt/cloud/*/destroyed' reactors='/srv/reactor/destroy/*.sls'

salt.runners.reactor.delete(event, saltenv='base', test=None)

Delete a reactor

CLI Example:

salt-run reactor.delete 'salt/cloud/*/destroyed'

salt.runners.reactor.is_leader()

Return whether the running reactor is acting as a leader (responding to events).

CLI Example:

salt-run reactor.is_leader

salt.runners.reactor.list_(saltenv='base', test=None)

List currently configured reactors

CLI Example:

salt-run reactor.list

salt.runners.reactor.set_leader(value=True)

Set the current reactor to act as a leader (responding to events). Defaults to True

CLI Example:

salt-run reactor.set_leader True

© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/runners/all/salt.runners.reactor.html