Ansible-Nginx-Cluster/roles/nginx_cluster/templates/lsynd.conf.j2

73 lines
3 KiB
Text
Raw Normal View History

2023-01-18 14:42:02 -07:00
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 }},
2024-02-01 07:28:30 -07:00
xattrs = {{ nginx_cluser_lsyncd_rsync_xattrs }},
2023-01-18 14:42:02 -07:00
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 }},
2024-02-01 07:28:30 -07:00
xattrs = {{ nginx_cluser_lsyncd_rsync_xattrs }},
2023-01-18 14:42:02 -07:00
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 }},
2024-02-01 07:28:30 -07:00
xattrs = {{ nginx_cluser_lsyncd_rsync_xattrs }},
2023-01-18 14:42:02 -07:00
rsh = "/usr/bin/ssh -l {{ nginx_cluster_user }} -i {{ nginx_cluster_private_key }} -o StrictHostKeyChecking=no",
temp_dir = "{{ nginx_cluster_temp_dir }}"
}
}
end