# {{ ansible_managed }} # ------------------------------------ # - Settings for script clean_trash.sh # ------------------------------------ # - days # - # - Files older then 'days' will be deleted. # - # - Defaults to: days=31 # - #days=31 # - trash_dirs # - # - Directories where files older than given days will be deleted. # - # - Example: # - trash_dirs="/data/samba/transfer/.Trash /data/samba/no-backup-share/multimedia/.Trash" # - #trash_dirs="" {%- set count = namespace(trash_dirs=0) %} {%- for item in samba_shares | default([]) %} {% if (item.vfs_object_recycle is defined and item.vfs_object_recycle|bool) %} {% set count.trash_dirs = count.trash_dirs + 1 %} {% endif %} {% endfor %} {% if count.trash_dirs > 0 %} trash_dirs=" {% for item in samba_shares %} {% if (item.vfs_object_recycle is defined and item.vfs_object_recycle|bool) %} {{ item.path }}/{{ item.recycle_path }} {% endif %} {% endfor %} " {% endif %}