Text file `default/lsyncd.conf.lua'

settings { logfile = "/home/clustermin/log/lsyncd/lsyncd.log", statusFile = "/home/clustermin/log/lsyncd/lsyncd.status", delay = 1, } {% set nextServer = null %} {% for peerServer in cluster.servers %} {% if server == peerServer %} {% set nextServer = cluster.servers[loop.last ? 0 : loop.index] %} {% endif %} {% endfor %} sync { default.rsync, source = "/home/clustermin/{{ syncFolder ? : 'www' }}", target = "{{ nextServer.privateIp }}:/home/clustermin/{{ syncFolder ? : 'www' }}", rsync = { archive = true, rsh = "ssh -l clustermin -i /home/clustermin/.ssh/clustermin_id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no", }, }