salt.beacons.watchdog module

watchdog beacon

New in version 2019.2.0.

Watch files and translate the changes into salt events

depends
  • watchdog Python module >= 0.8.3

class salt.beacons.watchdog.FileSystemEventHandler

A dummy class to make the import work

class salt.beacons.watchdog.Handler(queue, masks=None)
on_created(event)
on_deleted(event)
on_modified(event)
on_moved(event)
exception salt.beacons.watchdog.ValidationError
salt.beacons.watchdog.beacon(config)

Watch the configured directories

Example Config

beacons:
  watchdog:
    - directories:
        /path/to/dir:
          mask:
            - create
            - modify
            - delete
            - move

The mask list can contain the following events (the default mask is create, modify delete, and move): * create - File or directory is created in watched directory * modify - The watched directory is modified * delete - File or directory is deleted from watched directory * move - File or directory is moved or renamed in the watched directory

salt.beacons.watchdog.close(config)
salt.beacons.watchdog.to_salt_event(event)
salt.beacons.watchdog.validate(config)

Validate the beacon configuration