Some of the best use cases for the event system of Salt can be demonstrated by integration with the reactor system. In this recipe, we will learn about the reactor system in Salt and the procedure to configure it.
[root@salt-master ~]# mkdir -p /etc/salt/master.d
/etc/salt/master.d/reactor.confto have the following entries:
reactor: - 'cookbook/test': - /opt/salt/staging/event/test.sls
/opt/salt/staging/event/test.slsto have the following entries:
command_run: local.cmd.run: - tgt: '*' - arg: - 'ls -l /* > /tmp/test_output'