22 lines
663 B
Django/Jinja
22 lines
663 B
Django/Jinja
settings {
|
|
logfile = "/var/log/lsyncd/lsyncd.log",
|
|
statusFile = "/var/log/lsyncd/lsyncd-status.log",
|
|
statusInterval = 20
|
|
}
|
|
|
|
{% for node in groups['repo_all'] %}
|
|
{% if groups['repo_all'][0] != node %}
|
|
sync {
|
|
default.rsync,
|
|
source = "{{ repo_service_home_folder }}/repo",
|
|
target = "{{ hostvars[node]['ansible_ssh_host'] }}:{{ repo_service_home_folder }}/repo",
|
|
rsync = {
|
|
compress = true,
|
|
acls = true,
|
|
rsh = "/usr/bin/ssh -l {{ repo_service_user_name }} -i {{ repo_service_home_folder }}/.ssh/id_rsa -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o ServerAliveCountMax=5"
|
|
}
|
|
}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|