This commit is contained in:
Thomas S Hatch 2015-01-28 14:41:26 -07:00
parent c620cefddc
commit 9466dc25f3
4 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
'''
Watch files and translate the changes into salt events
'''
@ -15,6 +16,7 @@ except ImportError:
__virtualname__ = 'inotify'
def __virtual__():
if HAS_PYINOTIFY:
return __virtualname__
@ -81,7 +83,7 @@ def beacon(config):
rec = False
auto_add = False
# TODO: make the config handle more options
if not path in current:
if path not in current:
wm.add_watch(
path,
mask,

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
'''
A simple beacon to watch journald for specific entries
'''
@ -54,7 +55,6 @@ def beacon(config):
journal = _get_journal()
while True:
cur = journal.get_next()
print(cur)
if not cur:
break
for name in config:

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
'''
Beacon to fire events at login of users as registered in the wtmp file
'''
@ -35,7 +36,7 @@ def _get_loc():
return the active file location
'''
if LOC_KEY in __context__:
return __context
return __context__[LOC_KEY]
def beacon(config):

View File

@ -1244,7 +1244,7 @@ class SaltRaetMasterEvents(ioflo.base.deeding.Deed):
'''
Ioinits = {'opts': '.salt.opts',
'road_stack': '.salt.road.manor.stack',
'master_events': '.salt.var.master_events',}
'master_events': '.salt.var.master_events'}
def postinitio(self):
self.master_events.value = deque()