72 lines
3 KiB
Django/Jinja
72 lines
3 KiB
Django/Jinja
targets = { {{ nodelist }} }
|
|
|
|
settings {
|
|
logfile = "/var/log/lsyncd/lsyncd.log",
|
|
statusFile = "/var/log/lsyncd/lsyncd.status",
|
|
statusInterval = 1,
|
|
nodaemon = true,
|
|
insist = true
|
|
}
|
|
|
|
for _, target in ipairs( targets )
|
|
do
|
|
-- Site Data Sync
|
|
sync {
|
|
default.{{ nginx_cluser_lsyncd_mode }},
|
|
host = target,
|
|
source = "{{ nginx_cluser_sync_site_dir }}",
|
|
targetdir = "{{ nginx_cluser_sync_site_dir }}",
|
|
delay = {{ nginx_cluser_lsyncd_delay }},
|
|
rsync = {
|
|
times = {{ nginx_cluser_lsyncd_rsync_times }},
|
|
archive = {{ nginx_cluser_lsyncd_rsync_archive }},
|
|
compress = {{ nginx_cluser_lsyncd_rsync_compress }},
|
|
perms = {{ nginx_cluser_lsyncd_rsync_perms }},
|
|
acls = {{ nginx_cluser_lsyncd_rsync_acls }},
|
|
owner = {{ nginx_cluser_lsyncd_rsync_owner }},
|
|
xattrs = {{ nginx_cluser_lsyncd_rsync_xattrs }},
|
|
rsh = "/usr/bin/ssh -l {{ nginx_cluster_user }} -i {{ nginx_cluster_private_key }} -o StrictHostKeyChecking=no",
|
|
temp_dir = "{{ nginx_cluster_temp_dir }}"
|
|
}
|
|
}
|
|
|
|
-- Nginx Config Sync
|
|
sync {
|
|
default.{{ nginx_cluser_lsyncd_mode }},
|
|
host = target,
|
|
source = "{{ nginx_cluser_sync_config_dir }}",
|
|
targetdir = "{{ nginx_cluser_sync_config_dir }}",
|
|
delay = {{ nginx_cluser_lsyncd_delay }},
|
|
rsync = {
|
|
times = {{ nginx_cluser_lsyncd_rsync_times }},
|
|
archive = {{ nginx_cluser_lsyncd_rsync_archive }},
|
|
compress = {{ nginx_cluser_lsyncd_rsync_compress }},
|
|
perms = {{ nginx_cluser_lsyncd_rsync_perms }},
|
|
acls = {{ nginx_cluser_lsyncd_rsync_acls }},
|
|
owner = {{ nginx_cluser_lsyncd_rsync_owner }},
|
|
xattrs = {{ nginx_cluser_lsyncd_rsync_xattrs }},
|
|
rsh = "/usr/bin/ssh -l {{ nginx_cluster_user }} -i {{ nginx_cluster_private_key }} -o StrictHostKeyChecking=no",
|
|
temp_dir = "{{ nginx_cluster_temp_dir }}"
|
|
}
|
|
}
|
|
|
|
-- PHP Config Sync
|
|
sync {
|
|
default.{{ nginx_cluser_lsyncd_mode }},
|
|
host = target,
|
|
source = "{{ nginx_cluser_sync_php_config_dir }}",
|
|
targetdir = "{{ nginx_cluser_sync_php_config_dir }}",
|
|
delay = {{ nginx_cluser_lsyncd_delay }},
|
|
rsync = {
|
|
times = {{ nginx_cluser_lsyncd_rsync_times }},
|
|
archive = {{ nginx_cluser_lsyncd_rsync_archive }},
|
|
compress = {{ nginx_cluser_lsyncd_rsync_compress }},
|
|
perms = {{ nginx_cluser_lsyncd_rsync_perms }},
|
|
acls = {{ nginx_cluser_lsyncd_rsync_acls }},
|
|
owner = {{ nginx_cluser_lsyncd_rsync_owner }},
|
|
xattrs = {{ nginx_cluser_lsyncd_rsync_xattrs }},
|
|
rsh = "/usr/bin/ssh -l {{ nginx_cluster_user }} -i {{ nginx_cluster_private_key }} -o StrictHostKeyChecking=no",
|
|
temp_dir = "{{ nginx_cluster_temp_dir }}"
|
|
}
|
|
}
|
|
end
|