settings { logfile = "/var/log/lsyncd.log", nodaemon = false, } exec = function(event) local src = event.source if string.match(event.sourcePathname, "^" .. src .. "/%%[^/]+$") then spawnShell(event, "bash " .. src .. "ansible_best_practice.sh -dH -f " .. src .. " -t " .. src) end end ansible_best_practice = { maxProcesses = 1, delay = 0, onCreate = exec, onDelete = exec, onMove = exec, } sync { a