{{ ansible_header | comment }} # GLOBAL OPTIONS log file=/var/log/rsyncd # for pid file, dont' use /var/run/rsync.pid unless you're not going to run # rsync out of the init.d script. The /var/run/rsyncd.pid below is OK. pid file=/var/run/rsyncd.pid syslog facility=daemon uid = root gid = root use chroot = no read only = yes # On ne liste pas les modules list = no #max connections=2 ignore errors = no ignore nonreadable = yes # ne loggue pas tous les fichiers transfer logging = no dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz # verifie les droits de /etc/rsyncd.secrets strict modes = yes # personne n'accede aux modules par defaut hosts deny = * # Listen only on adm address = {{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv4.address }} # MODULE OPTIONS {# Liste des dossiers a sauvegarder par serveur, en plus de la racine. #} {% for partition in to_backup %} [{{ partition.name }}] path = {{ partition.path }} {% if partition.comment is defined %} comment = {{ partition.comment }} {% endif %} {% if partition.uid is defined %} uid = {{ partition.uid }} gid = {{ partition.gid }} {% endif %} {% if partition.auth_users is defined %} auth users = {{ partition.auth_users }} secrets file = {{ partition.secrets_file }} {% endif %} hosts allow = {{ partition.hosts_allow | join(" ") }} {% if partition.read_only is defined %} read only = {{ partition.read_only }} {% endif %} {% endfor %}