salt.beacons.watchdog
Watch files and translate the changes into salt events.
New in version 2019.2.0.
- 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
-
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.beacon(config)
salt.beacons.watchdog.close(config)
salt.beacons.watchdog.to_salt_event(event)
-
Validate the beacon configuration
salt.beacons.watchdog.validate(config)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/beacons/all/salt.beacons.watchdog.html