gonczor
gonczor

Reputation: 4146

Saltstack action on state change

I have a following config for saltstack to apply a change on Windows machine:

---
HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR:
  reg.present:
    - name:
    - vname: "Start"
    - vtype: "REG_DWORD"
    - vdata: 4

Is there any possibility to tell saltstack to flip the value back to 4 when someone changes it manually to different value?

Upvotes: 1

Views: 177

Answers (1)

laocius
laocius

Reputation: 842

Saltstack beacons & reactors are designed for this.

You can configure a beacon on the minion, when the value changes, it will send an event to the master; on the master side, you need to create a reactor to catch this event, and apply your salt state.

However, there are currently no such beacon for windows registry, you might have to write your own.

Upvotes: 1

Related Questions